Is there any inbuilt java API or class library for accessing pixels in a given image?
What I am planning to do is search one image inside another image.
For example : img1 is 24x24px , img2 is 1024x768px
assume that a symbol, similar to img1 may exists in img2 . Now I want to get X and Y coordinates of the symbol which is similar to the img1.
Is there any inbuilt java API or class library for accessing pixels in a
Share
Yes, there is, if you have your image as a
BufferedImagethen use thegetRGB(int x, int y)method to get the value of the pixel at the position (x, y).See the API documentation of
java.awt.image.BufferedImage.