I have extracted an image and transformed it into integer values and stored it in 2D array. My question is that is it possible to recreate a pixel from any value?

1 view (last 30 days)
Nikhil on 30 Dec 2012
Hello. I have described a situation above. In addition to the above information, I have transformed the image into binary valued image and stored it into an array. Now i want to recreate the image but only specific part of the image, so I want to know that is there any method we can use to pick particular pixel , select it and then convert it into an image?
I would really appreciate your help.

Accepted Answer

Matt J
Matt J on 30 Dec 2012
No, if "transformed it into integer values" means you quantized in some way (using e.g., ROUND, CEIL, FIX) then there is no going back.

More Answers (1)

Image Analyst
Image Analyst on 30 Dec 2012
Depending on what you mean, this is possible. If you mean that you have an image (can be any type: uint8, double, binary, whatever), and you somehow binarize it (generate a logical class image from it), then you can use ginput() or other methods (imrect, imfreehand, etc.) to manually indicate pixels or regions on the binary image, then use those manually indicated locations to read the pixel values from the original image. You can't get original image values from the binary/logical image, but presumably you still have the original image available in a variable still, and you can use that. If, for some reason, you no longer have the original image, then no, you can't get it back.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!