Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Need help with JAVA program. Steps are given below. Please write program and share program + result Use a 256x256 8 bit grayscale image. 1.

Need help with JAVA program. Steps are given below. Please write program and share program + result

Use a 256x256 8 bit grayscale image.

1. Write a program to display the histogram, negative image and image equalization

Steps for Histogram

i)Convert image file into a 256x256 unsigned two dimension array

ii) Populate 1d integer array with frequencies of all gray levels 0 to 255

iii) populate 2d array with gray scale value 255, using 0 for frequency of each gray level.

iv) convert the 2d integer array to byte aray and give resulting output image as .dat file or .pgm file.

Steps for negative image:

i)Convert image file into a 256x256 unsigned two dimension array

ii) Use the oepration 255 - Array[i][j] for each element on 2d integer array.

iii) Convert 2d integer array to byte array.

iv) display resulting image in .dat file or .pgm file.

Steps for image equalization:

i) convert image.dat to 256x256 unsigned 2d int array

ii) populate 1d integer array with frequencies of gray levels 0 to 255

iii) initialize 2d histogram integer array with gray scale value 255

iv) divide each element of gray scale frequeney array with 65536

v) multiply each element of gray scale frequency array with 255

vi) update 2d histogram integer array with gray scale value 255 , 0 for frequency of each gray level.

vii) convert 2d histogram integer array.to byte array and generate resulting image in .dat file or .pgm file

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

Oracle Database 11g SQL

Authors: Jason Price

1st Edition

0071498508, 978-0071498500

More Books

Students also viewed these Databases questions