?
Solved

Simple Edge Detection Class

Posted on 2004-09-10
8
Medium Priority
?
619 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

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 1000 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

Featured Post

Get real performance insights from real users

Key features:
- Total Pages Views and Load times
- Top Pages Viewed and Load Times
- Real Time Site Page Build Performance
- Users’ Browser and Platform Performance
- Geographic User Breakdown
- And more

Question has a verified solution.

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

After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses
Course of the Month13 days, 13 hours left to enroll

800 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