How to convert an image that is in binary format to something analyzable?
I am studying some simple image processing techniques and came across a question. A task that I want to carry out is to find circles of fixed size in a given image. I'd like to write my own code for learning purposes.
The image that I have is in JPEG format which is in binary, how can I quantize the image so that I can do quantitative analysis on it? I want to calculate the cross-correlation between the template and the image to match the circl开发者_开发知识库e.
Thanks a lot for your help.
Can you try converting the jpeg binary into a matrix data-structure?
For ex: in Java you could use code like this to get matrix out of an image using javax imageio package..
import java.awt.image.BufferedImage;
import java.io.File;
import javax.imageio.ImageIO;
File file = new File("file.jpg");
BufferedImage img;
img = ImageIO.read(file);
精彩评论