Simple Edge Detection Class

Hi,

I am new to java, i am making a simple edge detection program in java which takes a black and white striped jpg file. The aim of the program is that after reading the file from the disk, it  detects the black stripes from the white. The out put image need not be shown

I want to know which classes can be used for edge detection and how? I will appreciate your help in this regard.
dbms_dumbAsked:
Who is Participating?
 
CEHJConnect With a Mentor Commented:
if (rgbs[index] == 0xFFFFFF) {
    // white
}
else {
   // black
}
0
 
CEHJCommented:
Since it's pretty simple, you can determine which pixels are black and which white:

http://javaalmanac.com/egs/java.awt.image/ImagePixel.html
0
 
dbms_dumbAuthor Commented:
should i resize the image before i work on it, or leave it at its original size (400 x 500)? would this effect the detection?
0
Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

 
CEHJCommented:
>>would this effect the detection?

Yes. The pixels would be different
0
 
dbms_dumbAuthor Commented:
the link you sent just gets and sets the pixels. how do i compare the pixels?
and exactly how do i do the edge detection ?
an example algo will be helpful.

Ta.
0
 
dbms_dumbAuthor Commented:
well i am leaving this for now.(too late here 0300)..will b back on sunday...thanx alot for your help. I'll bug you again ;)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.