Solved

Simple Edge Detection Class

Posted on 2004-09-10
8
612 Views
Last Modified: 2009-12-16
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
Comment
Question by:dbms_dumb
  • 3
  • 3
8 Comments
 
LVL 86

Expert Comment

by:CEHJ
ID: 12030945
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
 

Author Comment

by:dbms_dumb
ID: 12031032
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
 
LVL 86

Expert Comment

by:CEHJ
ID: 12031049
>>would this effect the detection?

Yes. The pixels would be different
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Author Comment

by:dbms_dumb
ID: 12031122
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
 
LVL 86

Accepted Solution

by:
CEHJ earned 250 total points
ID: 12031184
if (rgbs[index] == 0xFFFFFF) {
    // white
}
else {
   // black
}
0
 

Author Comment

by:dbms_dumb
ID: 12031262
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
 
LVL 92

Expert Comment

by:objects
ID: 12031768
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
base64 decode encode 12 122
eclipse formatting 6 73
simple java question 3 44
javap not working 8 38
Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now