Purchase Solution

Java program for contouring images

Not what you're looking for?

Ask Custom Question

Hello!

I am trying to write a program in Java that will be able to recognise the contour of an image. An image is a two-dimentional table of boolean values (true=black, false=white), and the contour is the list of points which form the outer edge of the image.

Two files are attached. The first is my class Image, and the second is a test class which tries it out on an example. As you can see if you execute my program, I get a list of points and directions, but they are not quite correct.

I think there are only small changes to be made, and I would be very grateful if you could show me what to change so that it works properly.

Thanks for your help!

PS - In order to compile and execute the attachments, you have to change the name of the files from Image.txt to Image.java, and from Test.txt to Test.java. I had to save them as .txt, otherwise Brainmass wouldn't allow me to attach them!

Purchase this Solution

Solution Summary

Java programming for contouring images are analyzed. The contour lines for Boolean value tables are determined.

Solution Preview

Comments:

1. Boundaries must be checked to eliminate a possible direction (and more importantly, to prevent an error in the array numbering)
2. Will the contour lines always make right angle turns? If not, ...

Purchase this Solution


Free BrainMass Quizzes
Basic Computer Terms

We use many basic terms like bit, pixel in our usual conversations about computers. Are we aware of what these mean? This little quiz is an attempt towards discovering that.

Java loops

This quiz checks your knowledge of for and while loops in Java. For and while loops are essential building blocks for all Java programs. Having a solid understanding of these constructs is critical for success in programming Java.

Inserting and deleting in a linked list

This quiz tests your understanding of how to insert and delete elements in a linked list. Understanding of the use of linked lists, and the related performance aspects, is an important fundamental skill of computer science data structures.

Javscript Basics

Quiz on basics of javascript programming language.

Excel Introductory Quiz

This quiz tests your knowledge of basics of MS-Excel.