Question: PLEASE CODE THIS IN C ITS URGENT #include #include #define IMAGE_SIZE 10 // this function prints the array void printImgArray(int array[IMAGE_SIZE][IMAGE_SIZE]) { printf(------ Image Contents

 PLEASE CODE THIS IN C ITS URGENT #include #include #define IMAGE_SIZE10 // this function prints the array void printImgArray(int array[IMAGE_SIZE][IMAGE_SIZE]) { printf("------

PLEASE CODE THIS IN C ITS URGENT

#include

#include

#define IMAGE_SIZE 10

// this function prints the array

void printImgArray(int array[IMAGE_SIZE][IMAGE_SIZE])

{

printf("------ Image Contents ------- ");

for (int i=0; i

{

for (int j=0; j

printf("%02d, ",array[i][j]);

printf(" ");

}

printf("----------------------------- ");

}

/**

* This function colors each cell with a unique color

* (i.e. unique number)

**/

/*

void color(int Image[IMAGE_SIZE][IMAGE_SIZE])

{}

#ifndef __testing

int main(){

puts("testing the code with color() function");

int count = 0;

int cellImg[IMAGE_SIZE][IMAGE_SIZE]={{0,0,1,1,0,0,1,0,0,1},\

{1,0,1,1,0,0,1,1,0,1},\

{1,0,0,1,1,0,1,1,0,1},\

{1,1,0,0,0,0,0,0,0,0},\

{1,0,0,1,1,1,0,0,1,0},\

{0,0,0,0,1,0,0,1,1,0},\

{0,0,1,0,0,1,0,1,0,0},\

{0,0,1,1,0,0,1,0,0,0},\

{0,0,1,0,0,0,0,0,1,1},

{0,1,1,0,0,0,1,1,1,1}};

printImgArray(cellImg);

color(cellImg);

#endif

2. The second function labels each cell with a unique number. For example, if the given image (i.e., two-dimensional array) is something like the left picture below, one sample solution can be something like the right picture. It is not important how you choose the numbers for the cell, as long as it is not zero or a negative number. Also, the numbers do not need to be in a consecutive order. For example, one might label the cells in the example below with arbitrary numbers of 20, 3, 4, 8, 18, 7, 1. The signature of this function looks like below: void color (int image (IMAGE_SIZE] [IMAGE_SIZE]); This function gets the 10x10 two-dimensional array (like the left picture) and label each group of 1s (a distinct cell) with a unique number (like the right picture). 0 0 1 1 0 0 1 0 0 1 1 0 1 1 0 0 1 1 0 1 1 0 0 1 1 0 1 1 0 1 1 1 0 0 0 0 0 0 0 0 1 0 0 1 1 1 0 0 1 0 0 0 0 0 1 0 0 1 1 0 1 0 0 1 0 0 1 0 1 0 0 0 0 1 1 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 1 0 0 1 1 0 0 0 1 1 1 1 1 1 0 0 2 2 0 0 3 0 0 4 1 0 2 2 0 0 3 3 0 4 1 0 0 2 2 0 3 3 0 4 1 1 0 0 0 0 0 0 0 0 1 0 0 5 5 5 0 0 5 0 5 5 5 0 0 0 0 5 0 0 5 5 0 0 0 6 0 0 5 0 5 0 0 0 0 6 6 0 0 5 0 0 0 0 0 6 0 0 0 0 0 7 7 0 6 6 0 0 0 7 7 7 7 To solve this problem, you are free to define as many helper functions as required. To test your code, we only look at the return value and the content of the array, expecting that each blood cell is labeled with a unique number. In order to count a number of blood cells in a sample, a blood cell slide is created and looked at through a microscope's lens. To get a clear understanding of what a blood cell slide looks like, please see the picture below that borrowed from Wikimedia (https://commons.wikimedia.org/wiki/File:Sedimented red blood cells.jpg). was We were able to write a code the reads this image and convert it to a two-dimensional array, where the blood cells in red are represented with 1 and the rest is represented with zero. Then we got a small sample of this two-dimensional array for which we need to write a code that counts the number of blood cells. A blood cell is a group of 1s that are connected horizontally, vertically, or diagonally

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!