Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

PLEASE SOLVE THE QUESTION WITH PROGRAMMING LANGUAGE C AND USE THE DESIRED DATA STRUCTURES? * Hide pixels in a gray image's pixel file (matrix file)

PLEASE SOLVE THE QUESTION WITH PROGRAMMING LANGUAGE C AND USE THE DESIRED DATA STRUCTURES?

* Hide pixels in a gray image's pixel file (matrix file) in node structures.

* Group the nodes with the appropriate algorithm, that is, create tree groups (you will do this with the edge length difference formulas, neighboring pixels can be grouped).

* Then put those grouped matrix nodes into an array (now each index number in the array gets the value of its root in its group, so it's obvious they are in the same group).

* In short, with the C programming language, do it using the data structures we specified in the question, without using any library.

Take these items into consideration while solving the question and solve it by applying:

- Neighboring pixels should be taken into account when grouping. In other words, the numbers to the right, left, up and down of a pixel can be adjacent to each other.

- The edge weight between two neighboring pixels is the absolute value of the difference between two pixels.

- pixels = nodes (data structure)

- edge weights, lengths of graphs = difference between pixels

- There are as many nodes as there are pixels.

- The Minimum Spanning Tree algorithm will be calculated for each group as needed.

- The difference between the two nodes is the smallest edge that connects these two nodes.

- If two nodes are not connected to each other, that is, they do not have any edges, the pixel difference in the nodes is infinite or greater than the largest edge connecting the nodes.

- G ----> represents node, G1,G2, ..... represents groups.

- |G| -------> is the number of elements of the group formed by the joining nodes.

- T(G) = k / |G| --------------> k is a constant and its value is 300.

- minimum internal difference (G1, G2) = minimum ( internal difference (G1) + T(G1), internal difference ( G2 + T(G2) )

- For a matrix with M rows and N columns, an array of length M x N is created.

- At the beginning of the question, what needs to be done in the series is explained. Convert the graph data structure into an array with the "priority queue" algorithm.

matrix.txt file:

Please convert the image of .txt file to .txt file.

image text in transcribed

49 46 30 29 30 31 26 30 30 31 29 23 21 21 18 18 21 21 21 21 21 20 20 18 18 20 22 20 21 23 25 27 23 21 21 21 21 20 20 20 21 20 18 20 21 48 50 53 48 42 38 35 34 36 39 37 38 36 37 40 41 40 19 20 20 20 21 21 22 23 21 19 18 21 18 19 18 17 15 15 15 19 17 18 19 17 18 19 20 21 21 56 54 50 48 49 46 44 44 43 43 42 45 46 43 43 44 45 45 44 46 44 39 38 39 39 41 45 50 50 50 49 48 55 68 71 60 47 50 64 71 78 75 68 73 78 82 20 45 37 42 37 42 40 42 40 45 44 44 45 46 43 46 40 43 37 40 35 41 40 44 43 44 41 42 40 41 39 40 38 40 37 42 38 45 43 45 45 41 44 41 43 41 41 40 37 40 37 43 45 47 52 47 54 47 48 46 47 46 50 47 49 57 57 67 68 71 71 62 63 47 51 48 49 60 62 68 70 75 76 74 74 68 68 73 73 78 75 73 72 69 65 64 63 58 43 38 36 30 27 29 29 31 35 35 37 38 35 34 36 41 42 41 41 41 41 49 55 53 44 49 54 60 69 69 63 60 62 68 73 76 76 74 78 83 83 43 45 44 41 37 37 42 49 55 50 46 51 53 60 67 41 59 35 53 31 44 29 38 24 29 22 23 22 21 21 21 21 21 21 21 21 21 21 22 21 24 21 24 21 24 21 24 21 21 21 21 21 25 22 27 22 30 23 35 25 38 25 35 25 33 23 35 23 37 24 36 27 33 25 36 23 40 23 45 23 55 31 58 32 55 32 55 34 63 42 69 53 73 64 76 71 74 71 73 69 74 70 79 73 82 78 35 31 30 29 29 29 28 30 23 27 23 23 22 21 21 21 21 21 21 21 21 21 21 21 21 21 21 23 22 23 22 23 21 23 21 21 21 21 21 21 22 22 21 21 22 21 21 21 21 21 23 23 24 26 27 25 27 23 27 24 24 24 23 23 23 24 26 26 27 27 24 24 27 23 25 24 25 24 35 24 47 21 53 21 55 21 61 27 69 43 72 54 20 20 20 20 21 21 21 20 20 21 18 21 20 23 20 21 20 21 21 21 21 21 18 21 18 21 21 21 21 21 21 21 21 20 24 21 24 22 23 22 23 21 24 22 23 23 24 23 27 24 26 23 23 22 22 21 23 21 23 20 21 21 21 22 21 21 20 21 20 21 21 21 25 21 21 22 23 22 21 21 21 20 18 18 18 21 20 18 18 18 20 21 21 20 20 21 21 20 18 20 20 20 18 18 20 21 25 24 23 23 21 21 21 22 23 22 21 21 21 21 20 20 21 21 21 21 21 20 20 20 21 21 21 19 17 17 19 21 22 23 23 23 22 22 24 22 22 21 22 21 20 17 17 18 20 20 21 21 21 21 21 21 20 21 20 20 21 23 23 21 18 18 18 18 20 21 20 21 21 21 22 22 21 21 20 20 20 18 21 21 21 21 22 22 22 21 21 21 21 21 21 20 20 18 20 20 20 20 21 21 20 21 21 20 21 21 20 21 21 21 21 21 21 21 21 20 21 20 19 20 19 19 20 19 18 20 18 20 18 17 18 19 17 17 18 19 17 17 18 19 19 18 20 19 18 21 20 18 22 21 20 24 21 21 24 22 21 24 22 21 24 23 20 24 21 20 21 20 18 20 18 17 18 20 20 18 18 20 20 18 20 20 19 18 19 17 20 20 18 19 21 20 20 20 21 21 20 21 21 21 21 21 21 21 20 19 20 20 17 20 20 17 20 20 20 20 20 18 20 19 19 18 18 18 19 19 20 20 21 21 21 22 23 24 24 24 24 22 21 20 18 18 20 20 20 21 22 22 21 20 20 21 21 20 19 18 19 21 21 21 18 20 21 21 21 21 21 23 26 23 22 21 20 18 18 21 23 21 21 21 21 21 17 15 29 68 109 131 152 166 189 192 195 27 63 93 121 144 160 181 191 195 25 54 54 80 111 138 156 177 191 197 22 45 73 104 132 154 176 192 198 21 36 67 99 133 154 178 193 198 20 32 61 90 130 154 171 190 197 21 31 56 82 124 151 167 189 193 20 24 46 75 117 146 161 178 189 20 22 37 70 107 135 151 160 175 20 22 34 64 89 120 137 152 161 18 21 33 58 76 96 122 142 155 20 31 50 66 79 107 133 144 15 18 24 44 62 75 99 123 132 14 17 21 38 59 72 90 108 118 15 16 21 36 56 67 79 93 109 16 17 20 34 52 62 72 82 93 19 18 20 32 49 59 69 77 83 19 18 21 29 46 58 68 76 80 16 19 20 23 37 56 68 76 77 15 15 18 21 33 53 69 75 77 17 15 17 20 30 48 64 72 77 19 16 17 20 25 41 62 72 78 17 17 17 19 21 32 58 71 78 16 15 17 18 20 23 48 67 79 15 15 19 20 20 21 35 60 76 15 15 16 20 19 18 27 47 67 18 17 16 16 16 18 22 32 52 20 19 18 15 16 20 22 36 20 18 16 15 15 15 17 20 26 19 18 17 16 16 16 16 17 20 19 19 18 19 20 18 16 15 17 19 19 19 20 20 19 15 15 19 18 19 20 20 18 16 15 14 20 18 18 20 18 16 15 15 15 20 20 20 20 18 16 15 16 19 21 21 21 21 19 16 15 17 19 21 21 21 21 20 17 16 19 18 20 18 20 21 20 18 18 19 19 18 20 21 21 20 19 20 20 19 19 21 21 21 21 20 19 19 16 18 20 20 20 21 20 18 17 15 20 20 21 20 18 17 16 21 21 21 20 21 21 20 20 19 20 20 21 20 20 19 18 20 20 19 18 21 21 20 18 20 21 20 20 20 20 19 18 18 21 21 20 19 19 17 17 20 21 20 18 16 17 20 20 20 18 19 20 20 21 20 21 21 20 18 16 17 18 18 18 18 18 16 69 70 61 55 55 64 70 76 76 72 76 78 78 21 21 21 21 21 20 21 21 19 19 18 20 20

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

Graph Databases

Authors: Ian Robinson, Jim Webber, Emil Eifrem

1st Edition

1449356265, 978-1449356262

More Books

Students also viewed these Databases questions