Seam Carving for Content-Aware Image Resizing on flash platform
I’ve read the paper about seam carving technology long time ago ,the arithmetic is invented in 2007, the main idea for this technology is about analysis the content of image and find the prior removable pixels when resize it, to make this work ,they find out a energy function to evaluate the importance of each pixel, and then find out the less important pixel path though top to bottom(or left to right), finally remove all of the pixels(or insert new pixels) align the pixel path , which been named as “seam”.
There are several ways to evaluate the importance of pixels , gradient evaluation is the easiest approach, based on information theory, if the color of pixel slice changed more acute, then there must be more information contain in that group of pixels, obviously it turns out the pixels should also be more important.
But, the gradient map only demonstrate the importance of pixels relies on the vary of colors, that means the pixel of object edge marked as more important than the pixel inside the object shape , that is not true. Furthermore, some time the color vary of background frequent than color of foreground, but the fore ground should be the more important part.
So I think if we could integrate several different ways to evaluate the importance of pixels, that would get better result, in the thesis , the author also demonstrate the possibility of use human face detecting to find the face on the image, which must be the most important area, even let the user be able to draw some mark on the image mask, to tag the important area manually.
I’ve thinking about use some special way to analyses image, separate out the foreground and background area, we can use morphologic erode arithmetic operators from the edge of image, step in to the center, the erode operator have some energy, each pixel meet the operator must add the energy of the operator , if meet the high gradient pixel in the image, then increase the operator’s energy , otherwise keep step forward.
I’ll keep working on this project this month, see if my idea works.
About developing in to flash, because flash doesn’t support change the size of Bitmap Data, I’ve forced to make a new class to store the binary data, which make the code more complex, I’ve spend many hours on figure out how flash ByteArray work with color and it’s read pointer stuff, actionscript sometimes is really disgusting…
Filed under small beer in my life | Comment (0)Leave a Reply

