Simple Edge Detection Class

Posted on 2004-09-10
Last Modified: 2009-12-16

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.
Question by:dbms_dumb
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
LVL 86

Expert Comment

ID: 12030945
Since it's pretty simple, you can determine which pixels are black and which white:

Author Comment

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?
LVL 86

Expert Comment

ID: 12031049
>>would this effect the detection?

Yes. The pixels would be different
Industry Leaders: 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!


Author Comment

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.

LVL 86

Accepted Solution

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

Author Comment

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 ;)
LVL 92

Expert Comment

ID: 12031768

Featured Post

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
egit plugin on eclipse 8 102
mysql jsp example issue 32 74
Need Help! Getting a syntax error and don't understand why 3 41
Java 8 to Java 6 8 33
By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…

726 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