Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

We are given a 1D array with pixel value form range(0-255). The size of the image is 480x480. which means the array is a size

We are given a 1D array with pixel value form range(0-255). The size of the image is 480x480. which means the array is a size of 480x480. using that information i have to make image.I have got that part, now i need to find a path in the image using the algorithm below. and output should look like given below. I just need to find the algorithm to find that path. I am using c++. image text in transcribedimage text in transcribed

Algorithm To Determine the Path: Elev. Change Elev. Change Elev. Change Elev. Change 109 109 97 96 100 1077 100 97 100 97 100 105 105 105 5 105 104 Case 1: Go Down Case 2: Go Forward Case 3: Forward Preferred Case 4: Go Up or Down Page 1 Fig. 2: Figure above shows how algorithm applies the g strategy to a pixel (with grayscale values shown). The algorithm looks to the 3 choices and picks the pixel that causes the smallest change (least effort to walk). See the figure above. The idea is to start from an edge of the image (say the leftmost column), then make moves based on the pixels to the right, each time choosing the pixel that results in the smallest change. Your goal is to reach the right edge of the image. Algorithm To Determine the Path: Elev. Change Elev. Change Elev. Change Elev. Change 109 109 97 96 100 1077 100 97 100 97 100 105 105 105 5 105 104 Case 1: Go Down Case 2: Go Forward Case 3: Forward Preferred Case 4: Go Up or Down Page 1 Fig. 2: Figure above shows how algorithm applies the g strategy to a pixel (with grayscale values shown). The algorithm looks to the 3 choices and picks the pixel that causes the smallest change (least effort to walk). See the figure above. The idea is to start from an edge of the image (say the leftmost column), then make moves based on the pixels to the right, each time choosing the pixel that results in the smallest change. Your goal is to reach the right edge of the image

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

More Books

Students also viewed these Databases questions