Powered by glolg
Display Preferences Most Recent Entries Chatterbox Blog Links Site Statistics Category Tags About Me, Myself and Gilbert XML RSS Feed
Sunday, June 05, 2011 - 21:28 SGT
Posted By: Gilbert

Image Concerns

More sad stuff as Paul Scholes retires. I'll miss those pinpoint forty-yard balls sprayed to the wingers at exactly the right angle and pace.

My cousin put together a little montage to remember Mr. Ham J. D. Burger by, using his iPhone:


Mr. Ham with some of his prized trophies


The mantle of Mr. Ham must be carried on, and after three days of mourning, a successor was found (sneak preview follows). His name and story will follow... soon.




Photos And Predictions

The grades for my final final modules (unless I get bored and do some Masters someday) are back, and they are: A for Computational Photography, and B+ for Simulation and Modelling Techniques.

As happens so often with me, the results are a little ironic, as I decided to take Computational Photography mostly because it was fully assignment-based without final examinations, and I am by no measure a shutterbug, unlike so many people I know (I've said this, haven't I?). Heck, I haven't even replaced my point-and-shoot since I dropped it in Barcelona a couple of years ago.

I was pleasantly surprised, therefore, when some of the material happened to be on techniques that I had independently explored (on this very blog, no less) before; take for instance Seam Carving and Face Hallucination, which I believe is basically the Example-Based Super-resolution taught in the class. The difference was that this time round, I had to actually bang out the code.

Seam Carving is an interesting one. It would not be an exaggeration to say that it made huge waves (well, about as huge as could be expected) when it was first presented in 2007. It was, after all, a general method for recognizing and preserving the most significant details in an image, as follows:


Resizing never looked so good*


In the above example, when the width vs. height ratio of the image is changed, the usual rescaling distorts the image features, though it keeps their relative sizes constant. Cropping can preserve the original ratios, but loses whole blocks of information. Seam Carving, in contrast, can maintain the ratios of the most important features (like cropping), while automatically scaling the remainder of the image.

Now, rescaling (down) is simply compressing multiple pixels from the original image into a single one in the target; considering the simple case of halving each dimension of a 2D image, each pixel in the final image will just be the average of four in the original. Cropping is even more straightforward.

Then we have Seam Carving. It works on two principles:

  • We can know which regions of an image are more important
  • We can remove pixels from an image such that regions of least importance are lost first

The first principle can be satisfied by something as simple as a Prewitt or Sobel filter, which is merely observing how different a pixel is from its neighbours. Regions where this difference is small have little detail, and usually correspond to areas of less significance (e.g. the sky in the image above). These filters are taught in most introductory computer graphics courses.

For the second principle, we could of course simply remove individual pixels in ascending order of importance - however, this generally does not preserve any structure, although it does maximize information content. Most of the time, we wish to rescale an image from its original dimensions of (x,y) to some new dimensions (m,n).

This suggests that we can just remove (or add) the appropriate number of rows (or columns) of pixels, with the least important row being removed first - and this does indeed work, though it is somewhat vulnerable to leaving jagged edges (e.g. if several adjacent rows are removed).

Seam Carving thus uses seams, which are simply connected paths of pixels across an image, with one pixel in each row (or column). There isn't anything particularly exciting about seams by themselves, either - they can be computed with dynamic programming, which is often covered in introductory algorithms classes.

However, observe that these two fundamental techniques, available to many computer science students (possibly in their first year, even), combined into a very popular paper (over 250 citations in a few years), and a job at Adobe for one of the researchers. Oh, the paper has various extensions, but this is the meat and potatoes.

What else was covered (and done) in the course?

  • Snapping - how to snap a path around objects in an image (e.g. Photoshop's Magic Lasso), and separating background from foreground automatically
  • Poisson Image Integration - blending an object into another scene in a natural manner
  • Image Colorization - color a grayscale image (and potentially, video) given a rough initial markup
  • Tone Mapping - generate a final image (under-or-over) exposed to the desired degree, given a luminance map
  • Flash/No-Flash Photography - get rid of noise in poor lighting conditions by using a copy of that scene taken with a flash (which is however harsher, and does not convey the original mood)
  • Multi-Flash Camera - basically detecting edges with higher confidence using light from multiple points
  • Dual Photography - recreate what a projector sees, like magic! Unfortunately, it requires that the scene be lighted a single pixel at a time, without mentioning that it is not exactly easy to find an application for this technique
  • Focal Stacking - create an image that is everywhere in focus, using multiple shots taken with different focal lengths. Apparently quite commonly used in the hard sciences (e.g. microscopy work)
  • Flutter Shutter - Deblur a moving image, using special shutter patterns
  • Defocus Blur Detection - compensate for blur caused by projection at an angle
  • Texture Synthesis - generate a texture, or mend small problems with an image (e.g. folds in old photographs), may be demonstrated if I can find the time

I'll leave my thoughts on simulation for next time.


Party And Parcel

Something that I have not covered in the previous post, is the perception of the PAP as arrogant by some sections of the population (which is their own image problem). Are they? Well, they are certainly extremely confident that they are correct; whether that amounts to arrogance is another thing.

One possible route that the PAP could take, which I have neglected to mention, is that of gradual relaxation - it is very possible that by righting certain unhappy practices, like the tying of upgrading to votes, might win them more votes than it loses. There is, of course, the concern that conceding on these points might make them look weak (and indeed, sheer sticking to one's guns has always been an effective political strategy).

Come to think of it, they're sort of like Barcelona. Like them or not, you have to admit that they have achieved a lot. Now, if they could just cut down on all that diving (which especially rankles since they don't have to do it to win)...

The clearest signal in this respect would, to me, be true liberalization of the (print) press. Is the Straits Times (ST) biased (on politics), most glaringly in its Forum page? One passionate journalist argued in the negative on Facebook, but looking at the comments, not too many are convinced.

Distilling it down, my view is that what the ST says is invariably true, in the sense that it had been previously stated by someone in authority (whether scientific, or governmental, or whatever). It is also true, however, that many true things are not said by the ST. It can be recognized that our alternative news sites behave worse, but it again is the question of whether the ST, as a national newspaper, should hold itself to higher standards than Internet hacks.

Shifting to contrarian mode, I feel that the ST's election coverage in particular has been relatively fair (see an example criticism). It is unreasonable for the Opposition to expect prime placement, when they are still some way from having a majority. It would be a strange newspaper indeed, that headlines a party that cannot be reasonably be expected to win; if the positions were reversed, and the Workers' Party, say, formed the Government, I'm sure they would expect to be emphasized on the front page too. The obvious solution is to allow a competing general daily that tells the other side of the truth - but that may be a long time in coming.


It's all a matter of balance


comments (0) - email - share - print - direct link
trackbacks (10) - trackback url


Next: Audience Granted


Related Posts:
That's It?
Just Justice
Ho Ho Ho
Teeny Bit Taxing
Much To Do About Nothing

Back to top




10 trackbacks


Trackback by this, that, post, blog, article, forum, phorum, to...

this, that, post, blog, article, forum, phorum, to... - [bert's blog]


January 25, 2012 - 01:14 SGT     

Trackback by print manager application

print manager application - [bert's blog]


February 18, 2012 - 09:02 SGT     

Trackback by unlock iphone

unlock iphone - [bert's blog]


February 29, 2012 - 07:08 SGT     

Trackback by unlock iphone

unlock iphone - [bert's blog]


February 29, 2012 - 07:08 SGT     

Trackback by Kazantip Voyeur

Kazantip Voyeur - [bert's blog]


March 6, 2012 - 00:12 SGT     

Trackback by angry birds go hack

angry birds go hack - [bert's blog]


May 9, 2014 - 16:31 SGT     

Trackback by isc immobilier montpellier

isc immobilier montpellier - [bert's blog]


May 27, 2014 - 16:32 SGT     

Trackback by Plan My Baby

Plan My Baby - [bert's blog]


June 6, 2014 - 15:10 SGT     

Trackback by Magnetic Reading Glasses

Magnetic Reading Glasses - [bert's blog]


August 3, 2014 - 11:31 SGT     

Trackback by look what i found

look what i found - [bert's blog]


September 15, 2014 - 09:54 SGT     


Copyright © 2006-2025 GLYS. All Rights Reserved.