Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Hello, I need help writing code in Java to test out the junit test in the photo. the Hint I was given was : This

Hello, I need help writing code in Java to test out the junit test in the photo.
the Hint I was given was :
This is a more challenging filter as you must consider a rectangular window that will move throughout the span of the image.
1.Take a 2x2 window (starting from the upper-left corner of the image) and sum all the red, green, and blue values separately for all the pixels in that window. In a 2-by-2 window, there will be a total of 4 pixels for which to sum the three separate channels.
2. Take the sum found for each channel of all the pixels in the window and divide them by 4.
3.Set the red, green, and blue values of the top-left-most pixel of the 2-by-2 window to be the value calculated from #2.
4.Perform this on the entire image moving the 2x2 window by one pixel each time from left-to-right and top-to-bottom where top-most will be row 0 and left-most is column 0.
Thank you
image text in transcribed

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_2

Step: 3

blur-text-image_3

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

Advanced Database Systems For Integration Of Media And User Environments 98

Authors: Yahiko Kambayashi, Akifumi Makinouchi, Shunsuke Uemura, Katsumi Tanaka, Yoshifumi Masunaga

1st Edition

9810234368, 978-9810234362

More Books

Students also viewed these Databases questions

Question

600 lb 20 0.5 ft 30 30 5 ft

Answered: 1 week ago