Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8679985
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T21:08:00+00:00 2026-06-12T21:08:00+00:00

Given an image such as the CakePHP logo, how can this image be converted

  • 0

Given an image such as the CakePHP logo, how can this image be converted back into a PSD with the layers. As a human, I can easily work out how to translate this back to a PSD with layers. I can tell that the background is a circular shape with star edges. So the circular star part is at the back, the cake image is on top of this and the words CakePHP is over all of these two images.

I can use Photoshop/Gimp tools to separate these images into three images and fill in the areas in-between. Then I have three layers.

enter image description here

As a human, it is easy to work out the layering of most logos and images and many images have multiple layers, the CakePHP logo is just one example. Images in the real world also have a layering, there may be a tree layer on top of a background of grass. I need a general way to convert from an image back to the layered representation, ideally a software solution.

In absence of a programmed solution, are there any papers or research which solve this problem or are related to this problem? I am mostly interested in converting human constructed images such as logos or website titles back to layered representation.


I want to point out some benefits of doing this, if you can get this image to a layered representation automatically then it is more easy to modify the image. For example, maybe you want to make the cake smaller, if the computer already layered the cake on top of the red background, you can just scale the cake layer. This allows for layer adjustment of images on websites which do not have layer information already.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T21:08:01+00:00Added an answer on June 12, 2026 at 9:08 pm

    As already mentioned, this is a non-trivial task. Ultimately, it can be most
    simply phrased as: given an image (or scene if real photo) which is composed of
    pixels N, how can those be assigned to M layers?

    For segmentation, it’s all about the prior knowledge you can bring to bear to
    this as to what properties of pixels, and of groups of pixels, give “hints”(and
    I use the word advisedly!) as to the layer they belong to.

    Consider even the simplest case of using just the colour in your image. I can
    generate these 5 “layers” (for hue values 0,24,90, 117 and 118):

    1
    2
    3
    4
    5

    With this code (in python/opencv)

    import cv 
    
    # get orginal image
    orig = cv.LoadImage('cakephp.png')
    
    # show original 
    cv.ShowImage("orig", orig)
    
    # convert to hsv and get just hue
    hsv = cv.CreateImage(cv.GetSize(orig), 8, 3) 
    hue = cv.CreateImage(cv.GetSize(orig), 8, 1) 
    sat = cv.CreateImage(cv.GetSize(orig), 8, 1) 
    val = cv.CreateImage(cv.GetSize(orig), 8, 1) 
    cv.CvtColor(orig, hsv, cv.CV_RGB2HSV)
    cv.Split(hsv,hue,sat,val,None)
    #cv.ShowImage("hue", hue)
    
    # loop to find how many different hues are present...
    query = cv.CreateImage(cv.GetSize(orig), 8, 1) 
    result = cv.CreateImage(cv.GetSize(orig), 8, 1) 
    for i in range(0,255):
      cv.Set(query,i)
      cv.Cmp(query,hue,result,cv.CV_CMP_EQ)
      # if a number of pixels are equal - show where they are 
      if (cv.CountNonZero(result)>1000): # <-what is signficant?
        cv.ShowImage(str(i),result)
        cv.SaveImage(str(i)+".png",result)
        cv.WaitKey(-1)
    

    But, even here we are having to describe what is “significant” in terms of the
    number of pixels that belong to a mask (to the extent that we can miss some
    colours). We could start to cluster similar colours instead – but at what
    density does a cluster become significant? And if it wasn’t just pure colour,
    but textured instead, how could we describe this? Or, what about inference that
    one layer is part of another, or in front of it? Or, ultimately, that some of
    the layers seem to be what we humans call “letters” and so should probably be
    all related…

    A lot of the research in Computer Vision in segmentation generally tries to take
    this problem and improve it within a framework that can encode and apply this
    prior knowledge effectively…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Given an original image of: This resizes to look as such: ALL the images
I'm given an image of unknown size. I want to shrink it such that
I need to upload a given image using Amazon S3 I have this PHP:
Does anyone know how I can create a Completely transparent image or given am
I am looking for an algorithm that given a photo / image, it can
I have grid of images, when the mouse is over any given image a
Question: Given an image in PNG format, what is the simplest way to programmatically
I have given bg image for radio button. It is working in chrome but
Given a url to an image is there a way in Django/Python to pull
Given a URL to an image (and not the image itself), what's the most

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.