Question: 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.
Data structures and functions you will use in the question:
- pixels = nodes (data structure) (PIXELS ARE BETWEEN 0-255 VALUES.)
- 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.
WRITE THE ABOVE QUESTION IN C OR C++ LANGUAGE. PLEASE DO NOT SOLVE WITH ANY OTHER PROGRAMMING LANGUAGE.
matrix.txt file:
Please convert the image of .txt file to .txt file.

129 113 104 111 118 138 158 157 151 143 161 188 189 159 149 150 158 163 167 158 154 158 170 189 197 195 187 183 191 196 194 172 162 177 185 190 200 204 203 199 201 207 198 189 192 192 193 193 205 210 211 214 208 206 195 187 191 196 200 201 209 212 216 218 212 205 195 186 189 195 206 207 206 212 218 216 206 201 194 187 184 197 213 216 203 207 210 207 197 194 188 181 187 197 216 220 200 200 200 197 190 188 160 159 166 198 220 211 197 196 195 191 171 155 143 145 165 198 217 199 194 194 192 178 155 136 119 130 160 197 209 193 191 193 190 163 145 127 115 132 162 200 208 192 189 190 184 157 140 119 115 142 178 212 214 194 172 172 161 147 132 109 106 139 190 217 217 201 156 157 151 141 125 92 83 122 186 212 214 194 143 142 139 139 128 67 82 138 166 178 145 132 130 136 143 147 130 76 60 75 103 101 75 121 130 149 157 172 193 152 85 60 60 59 44 111 130 149 165 199 209 217 192 106 53 31 27 88
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
