Got Questions? Get Answers.
Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
code for Compressed Sensing?

Subject: code for Compressed Sensing?

From: Michael Levin

Date: 30 Mar, 2010 13:26:05

Message: 1 of 8

I am a biologist and have come across a technique called Compressed Sensing

http://www.wired.com/magazine/2010/02/ff_algorithm/all/1

    which is supposed to make images higher-resolution. I'm curious to try it on some of our images taken from microscopes (where we often wish we had sharper, higher-res views). I don't have the time right now to code directly from the math papers I've seen on this subject. Does anyone know of a Matlab script that simply takes a JPG or TIFF image as input, does its "magic", and gives me an output file I can look at to see if this helped anything?

thanks,

Mike

Subject: code for Compressed Sensing?

From: Zainul

Date: 31 Mar, 2010 13:55:05

Message: 2 of 8

Hi Michael,

A good starting point is a list of Matlab programs maintained by Igor Carron here: http://sites.google.com/site/igorcarron2/cs#reconstruction

As far as I know, there is no piece of code that just does universal image sharpening on an image as is. CS algorithms need some idea of context, so it is important to crystallize what knowledge you have about the image you are looking at, in order for the algorithms to work. For example, most image compression algorithms today use the Discrete Cosine Transform or the Discrete Wavelet Transform to model naturally occurring smooth areas and edges. You might be able to use the same for your microscope images.

If you could post (or email me personally) some of the images you would like to sharpen, I could test it with code I use.

Regards,
Zainul.


"Michael Levin" <mlevin@forsyth.org> wrote in message <hosu5d$nne$1@fred.mathworks.com>...
> I am a biologist and have come across a technique called Compressed Sensing
>
> http://www.wired.com/magazine/2010/02/ff_algorithm/all/1
>
> which is supposed to make images higher-resolution. I'm curious to try it on some of our images taken from microscopes (where we often wish we had sharper, higher-res views). I don't have the time right now to code directly from the math papers I've seen on this subject. Does anyone know of a Matlab script that simply takes a JPG or TIFF image as input, does its "magic", and gives me an output file I can look at to see if this helped anything?
>
> thanks,
>
> Mike

Subject: code for Compressed Sensing?

From: Michael Levin

Date: 31 Mar, 2010 15:07:04

Message: 3 of 8

"Zainul " <zainulcharbiwala@gmail.com> wrote in message <hovk7p$9de$1@fred.mathworks.com>...
> Hi Michael,
>
> A good starting point is a list of Matlab programs maintained by Igor Carron here: http://sites.google.com/site/igorcarron2/cs#reconstruction
>
> As far as I know, there is no piece of code that just does universal image sharpening on an image as is. CS algorithms need some idea of context, so it is important to crystallize what knowledge you have about the image you are looking at, in order for the algorithms to work. For example, most image compression algorithms today use the Discrete Cosine Transform or the Discrete Wavelet Transform to model naturally occurring smooth areas and edges. You might be able to use the same for your microscope images.
>
> If you could post (or email me personally) some of the images you would like to sharpen, I could test it with code I use.

   thanks!! I will send you some images via email. I'm not sure how to post them here - I don't see a link for adding attachments to my post (I'm using a web form from the Matlab website). I appreciate your help.

Mike

> "Michael Levin" <mlevin@forsyth.org> wrote in message <hosu5d$nne$1@fred.mathworks.com>...
> > I am a biologist and have come across a technique called Compressed Sensing
> >
> > http://www.wired.com/magazine/2010/02/ff_algorithm/all/1
> >
> > which is supposed to make images higher-resolution. I'm curious to try it on some of our images taken from microscopes (where we often wish we had sharper, higher-res views). I don't have the time right now to code directly from the math papers I've seen on this subject. Does anyone know of a Matlab script that simply takes a JPG or TIFF image as input, does its "magic", and gives me an output file I can look at to see if this helped anything?
> >
> > thanks,
> >
> > Mike

Subject: code for Compressed Sensing?

From: Oliver Woodford

Date: 31 Mar, 2010 16:01:22

Message: 4 of 8

"Michael Levin" wrote:
> I am a biologist and have come across a technique called Compressed Sensing
>
> http://www.wired.com/magazine/2010/02/ff_algorithm/all/1
>
> which is supposed to make images higher-resolution. I'm curious to try it on some of our images taken from microscopes (where we often wish we had sharper, higher-res views). I don't have the time right now to code directly from the math papers I've seen on this subject. Does anyone know of a Matlab script that simply takes a JPG or TIFF image as input, does its "magic", and gives me an output file I can look at to see if this helped anything?
>
> thanks,
>
> Mike

Mike, I suggest you also read this:
http://nuit-blanche.blogspot.com/2010/03/why-compressed-sensing-is-not-csi.html
The 'magic' you talk about actually doesn't exist. Super-resolution algorithms do, but they _invent_ detail, and you certainly wouldn't want to use them on scientific data from which you then draw conclusions.

Subject: code for Compressed Sensing?

From: Michael Levin

Date: 31 Mar, 2010 16:25:06

Message: 5 of 8

"Oliver Woodford" <o.j.woodford.98@cantab.net> wrote in message <hovrki$et2$1@fred.mathworks.com>...
> Mike, I suggest you also read this:
> http://nuit-blanche.blogspot.com/2010/03/why-compressed-sensing-is-not-csi.html
> The 'magic' you talk about actually doesn't exist. Super-resolution algorithms do, but they _invent_ detail, and you certainly wouldn't want to use them on scientific data from which you then draw conclusions.

  thanks; I thought that, since many biological objects have regular or repetitive features, that a clever algorithm could use it to (more or less usefully) guess at missing detail. In particular, the Wired story referred to using the technique to make medical decisions based on processing of a body scan, which made me think we could do useful processing of our images as well.

Mike

Subject: code for Compressed Sensing?

From: Oliver Woodford

Date: 31 Mar, 2010 16:37:22

Message: 6 of 8

"Michael Levin" wrote:
> > Mike, I suggest you also read this:
> > http://nuit-blanche.blogspot.com/2010/03/why-compressed-sensing-is-not-csi.html
> > The 'magic' you talk about actually doesn't exist. Super-resolution algorithms do, but they _invent_ detail, and you certainly wouldn't want to use them on scientific data from which you then draw conclusions.
>
> thanks; I thought that, since many biological objects have regular or repetitive features, that a clever algorithm could use it to (more or less usefully) guess at missing detail. In particular, the Wired story referred to using the technique to make medical decisions based on processing of a body scan, which made me think we could do useful processing of our images as well.
>
> Mike

The thing the article failed to mention is that for compressed sensing you need a compressive sensor! The lesson we can all learn (again) is never to believe an article on a scientific subject in the mainstream media.

If you want to improve the resolution of images captured with a normal sensor I suggest you look at single-image super-resolution methods, but don't hold your breath.

Oliver

Subject: code for Compressed Sensing?

From: Michael Levin

Date: 31 Mar, 2010 16:53:04

Message: 7 of 8

"Oliver Woodford" <o.j.woodford.98@cantab.net> wrote in message <hovto2$i96$1@fred.mathworks.com>...
> The thing the article failed to mention is that for compressed sensing you need a compressive sensor! The lesson we can all learn (again) is never to believe an article on a scientific subject in the mainstream media.

   What exactly counts as a compressive sensor? If the body scan mentioned in the article counts, perhaps some of the noise in our images (taken through microscopes with tons of lenses, filters, water surfaces, etc. in the light path) has this property as well?

> If you want to improve the resolution of images captured with a normal sensor I suggest you look at single-image super-resolution methods, but don't hold your breath.

  ok thanks!

Mike

Subject: code for Compressed Sensing?

From: Oliver Woodford

Date: 31 Mar, 2010 17:15:22

Message: 8 of 8

"Michael Levin" wrote:
> What exactly counts as a compressive sensor? If the body scan mentioned in the article counts, perhaps some of the noise in our images (taken through microscopes with tons of lenses, filters, water surfaces, etc. in the light path) has this property as well?

Computing a blur kernel (the blur caused by motion or aperture effects, possibly lens, filter and water effects too, as long as they are linear) and deconvolving (i.e. undoing the blur) probably has links with compressive sensing (sparse coding certainly, which is again related), and there are techniques to do this. However, they do (need to) assume that the blur kernel applied to the image is translation invariant, i.e. the same across the entire image. Without that constraint the problem would be far too underconstrained. Note that in compressive sensing the blurring is essentially random (depending on the sensor), but known (importantly).

Regards,
Oliver

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us