• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 622
  • Last Modified:

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.
0
dbms_dumb
Asked:
dbms_dumb
  • 3
  • 3
1 Solution
 
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
 
CEHJCommented:
>>would this effect the detection?

Yes. The pixels would be different
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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
 
CEHJCommented:
if (rgbs[index] == 0xFFFFFF) {
    // white
}
else {
   // black
}
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

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now