The professional, friendly Java community. 21,500 members and growing!

The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.

image compare

hi i am new here and started to study java programming (almost a week now).
I have project that is called image comparison.
This is the problem description.
1.Program will convert image (jpg) to RGB values and send this values to csv file.
2.program will identify the differences of the test image compare to the original image.
-- Compare Red average ,Green Average and Blue average of original image to test image
this what it looks like. Hope you can help me regarding on this..see attachedsampleresult.jpg

Re: image compare

Wow! One week into java and you are already taking on Image Manipulation. This is a pretty intense topic so make sure you can walk before you run.

I wrote a tutorial on Image Processing. The theory section may be helpful. Basically, you will be loading each of the images as a BufferedImage and then iterated through the pixels, constructing two, two dimensional arrays that hold the RGB value of each pixel. Then you need to write a method that compares the two arrays and looks for differences (nested for loops) and returning the results (a two dimensional array of booleans would work). This is the easy part. There are two hard parts. The first is highlighting the differences. You could construct a another image using the first image and the results of the comparison that draws the different pixels yellow for example. The other hard part is trying to identify movement or scaling differences. For example, if you crop the second image by 1 pixel at the top, this algorithm would falsely identify ALL pixels as being altered.

Like I said, image processing is a pretty complex topic so make sure you have the fundamentals down pat before you tackle this assignment.