Solved

Simple Edge Detection Class

Posted on 2004-09-10
8
610 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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …

708 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

11 Experts available now in Live!

Get 1:1 Help Now