Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

*** PROGRAM MUST BE WRITTEN IN JAVA, (NOT C++) AND ARRAY MUST BE HARDCODED *** In this project, you will be doing some simple image

*** PROGRAM MUST BE WRITTEN IN JAVA, (NOT C++) AND ARRAY MUST BE HARDCODED ***

In this project, you will be doing some simple image processing operations on what is called Chain coding. Chain coding is an efficient process to represent contours and/or edge image information of an image via traversing contours/edges and encoding their direction at each step. This procedure is widely used in image processing applications especially where binary shape coding is required. One example is the Freeman chain code developed in 1961, which is an eight connectivity directional encoding scheme in which a link represents the direction between two points (pixels). This coding scheme consists of eight possible directions numbered from 0-to-7 as shown in Figure 1.

image text in transcribed

Figure 2 provides an example of how to encode a binary image consisting of zeros and ones using Freeman chain code. It starts with an upper left portion of an image where you have 1 (i.e. starting point in the example in Figure 2) and it traverses the image. The link between the first two pixels is to the right, thus it is encoded as zero and so on.

Write a simple chain code program and test it on the image below.

image text in transcribed

THE 2D ARRAY

{ {0,1,0,0,0,0,0,0},

{0,1,0,0,0,1,0,0 },

{0,1,1,1,0,0,1,0 },

{0,0,0,1,1,0,0,1 },

{0,0,0,0,1,0,0,1},

{0,0,0,0,0,1,0,0 },

{0,0,0,0,0,0,1,0 }};

--------------------------------------------------------

EXPECTED OUTPUT:

6, 6, 0, 0, 6, 0, 6, 7,7,

7, 7, 6

--------------------------------------------------------

**PLEASE SHOW ME YOUR OUTPUT**

Figure 1. Eint directions of Freeman chain code Figure 2. Example of an image being encoded using Freeman chain code

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

MongoDB Applied Design Patterns Practical Use Cases With The Leading NoSQL Database

Authors: Rick Copeland

1st Edition

1449340040, 978-1449340049

More Books

Students also viewed these Databases questions

Question

=+j Describe an effective crisis management program.

Answered: 1 week ago