How to read two images using ImageProcessor

I am reading a book which writes
ImageProcessor ip1=… //Target image
ImageProcessor ip2=… // Source Image
Now I opened two images “ip1.jpg” and “ip2.jpg”, what code should I replace the “…”?

Hi @zhang_zx,

I believe you’re using a programming language but i don’t know which now. If you use Java, you can open your images with the ImagePlus class. Then you can call the getProcessor() method that returns an ImageProcessor.

I’m pretty sure these methods exist in other languages too.

1 Like

Just to complete @AdaTextIO’s answer, you should have a look at the ImageJ1 API, and the corresponding ImageProcessor and ImagePlus classes.

1 Like