Need to write C Program

I gang

Quadtrees are created from images whose sizes are integer powers of 2. Each node of the quadtree corresponds to a square area in the binary image. The node at level 0 of the tree corresponds to the whole image area. Child nodes correspond to the areas given by dividing the image into 4 non-overlapping quadrants. The quadrants are denoted NW (north-west), NE (north- east), SE (south-east) and SW (south-west) respectively.

1. Read a square binary image from a text file into an array structure,

2. Generate a pointer based quadtree from the binary image,

3. Traverse through the pointer based quadtree and print out for each black terminal node the position of the top left of the quadrant and its size.

The program must read the image data from a text file which contains coded information on the size of the image and the number and position of black pixels in the image. The image file contains integers and the file has the following format:

image width in pixels

number of black pixels

x y location of each black pixel

For the example of the image in Figure 1, the file would contain the data shown in Figure 3. You can assume that the image size will never exceed 64 columns by 64 rows.

8 15 41 51 22 32 42 52 23 33 43 53 44 54 64 45 55

Figure 3: Input file example

Use an integer array as an intermediate data structure to help in generating the pointer based quadtree. Producing the pointer based quadtree involves taking the array and generating a node to represent it. The array can then be tested for colour uniformity. If it is not of a uniform colour then the array must be divided into four quadrants and nodes created for these. Each quadrant must then be tested and the same process recursively performed until all terminal nodes of the tree represent uniformly coloured areas. Internally your program should represent each node of the quadtree as a struct datatype containing 9 fields. The first five pieces of information are pointers to the parent, P, and four children of the node (NW, NE, SE, SW), the next piece of information is the colour of the node (i.e. B, W or G), and the final three pieces of information are the size and centre coordinates of the block of pixels that the node represents.

Input parameters

Your program should read data from a file with path specified using a command line parameter.

This parameters should be the only parameter expected by the program, and should be required to be specified immediately after the executable name at run-time e.g. quadtree

[url removed, login to view]

The input file will contain the image data in a format as illustrated in Figure 3 and in the example

file [url removed, login to view] provided.

Output data

Your program should print out on the screen the list of all terminal black nodes. The output should indicate for each black terminal node the position of the top left of the quadrant and its size. For example, the output of processing the example file [url removed, login to view] provided on is shown in Figure 4. It should be noted that there is no specific requirement in terms of the order in which the black terminal nodes are printed out. Therefore any output where

the lines shown in Figure 4 are permuted would be equally valid.

Black terminal node at position (2,2) with size 2

Black terminal node at position (4,1) with size 1

Black terminal node at position (5,1) with size 1

Black terminal node at position (4,2) with size 2

Black terminal node at position (4,4) with size 2

Black terminal node at position (6,4) with size 1

Figure 4: Example screen output when processing input file shown

The purpose of the procedure or function,

The description of all input and output parameters.

The deliverables for this project will be:

Program in C and Report explaining it.

Færdigheder: C programmering, C++ Programmering

Se mere: what you need to write a creative writing piece, program c++ freelance, cannot run program c users leila appdata local android sdk tools android bat createprocess error 2 the system cannot find the fi, academic write need to know, program c online, karachi c# programmer need, program c, freelance linux program c, c# write integration test for my sample program, c write integration test for my sample program, program read write image, write short story children books, write book blurb children, program needs write, write short story children story illustrations, write short story children books illustrations, write cover text children book, write need article, program read write file, simple program read write file, program will write external file, sql children tree parent, descriptive writing samples need editied children

Projekt-ID: #13452700

Tildelt til:

cshahzad

I am an expert of C and C++ having more then 1 year experience of development. I developed many projects of different fields. I can you this job for you in a very nice way.

$25 USD på 1 dag
(4 bedømmelser)
1.8

6 freelancere byder i gennemsnit $21 for dette job

wangbeizou

Hello. How are you. I have read and understood the project. I have strong knowledge in Data structures and Algorithms. And I'm expert in Java ,C/C++,C#, Python ,PHP etc. I'm interested this project. So, firstly Mere

$25 USD på 1 dag
(75 bedømmelser)
5.5
donfoss6

We are highly experienced Post Graduate Engineers, Doctors, IT, ITES, Software, Infrastructure Professionals, Web Designers and IT Architects. We can redo, improve, and publish any engineering, scientific MATLAB, S Mere

$10 USD på 1 dag
(2 bedømmelser)
1.7
yahiakhelil90

A proposal has not yet been provided

$18 USD in 3 dage
(0 bedømmelser)
0.0
$25 USD på 1 dag
(0 bedømmelser)
0.0
mzdesmag

Dear client i can provide complete solution on your project as i have executed it before. My commitment lies in honesty, integrity, ethical code of conduct, efficiency and speedy respond, i love to work hard to meet Mere

$10 USD på 1 dag
(0 bedømmelser)
0.0
Electr0mech

Hi Hope you are good I am expert in this field Will deliver all files Hope i will get a chance Thanks Will give discount

$25 USD på 1 dag
(0 bedømmelser)
0.0