#include "header.h" /* Written by Waqas Akram, Justin Romberg, & Charles Gamiz, May 1997 */ struct pixel * create_pixel(int m, int n) { struct pixel * temp = (struct pixel*)calloc(1, sizeof(struct pixel)); temp->m = m; temp->n = n; temp->next = NULL; return temp; } struct region * create_region() { int i,j; struct region * temp = (struct region*)calloc(1, sizeof(struct region)); temp->mean = 0; temp->std = 0; temp->SumOfSquares = 0; temp->SumOfValues = 0; temp->num_pixels = 0; temp->num_edge = 0; temp->pixel_list = NULL; temp->edge_list = NULL; temp->visit = (char**)calloc(sizeI[0], sizeof(char*)); for (i=0; ivisit[i] = (char*)calloc(sizeI[1], sizeof(char)); } for (i=0; ivisit[i][j] = 0; } } temp->member = (char**)calloc(sizeI[0], sizeof(char*)); for (i=0; imember[i] = (char*)calloc(sizeI[1], sizeof(char)); } for (i=0; imember[i][j] = 0; } } temp->next = NULL; return temp; }