Read the image representation information from two files


Digital Image Processing - CSCI 4301

Project 07. Image Representation using Q-trees

Complete the Quad tree representation project posted in the source code tab by providing the functionality for creating the original binary image based on its given quad tree representation from two text files (as shown below). By doing this, you will have both decomposition (which I provided: the tree representation as well as the object representation (two strings)) and the reconstruction, which you will create in this project.

As the example below shows, given a binary tree, quad tree representation decomposes the images into four quadrants as long as the quadrant is not uniform (the predicate tests the current quadrant for that condition). The output of the decomposition is the set of two codes shown below the tree.

1553_Figure1.jpg

As a test case, you can use the following outputs from my part of the code,
treeRepString2 = "01011011111101111"
objectRepString2 = "0000001111101"
and with a given size that you provide, you should be able to reproduce the binary image:

1449_Figure2.jpg

Notice that I appended a 0 at the beginning of the tree code to get the decomposition started. It is either a typo in the ppt slides, or that they are assuming non-trivial case (i.e., we will always decompose at least once). It would be more prudent to have it explicitly in the output, which is what I did and assumed for the two parts of the project.
Your code should provide the reconstruction: it should take the representations, the two strings, and produce an image out of them. The only additional parameter would be the image size (which you should assume to be square).

Typically the output strings would come from a file, instead of just being given as string objects. Make sure to add the following functionalities:

- Read the image representation information from two files: fname_tree.txt & fname_object.txt.

- Create the original input image with the quadrants of decomposition delineated. Here is an example of one of a sample real-life example. The two input text files are not shown, but the produced images are as below.

2250_Figure3.jpg

This project will be graded as run/no-run. So make sure it runs and produces the two desired images.

Attachment:- Project071.rar

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: Read the image representation information from two files
Reference No:- TGS01688670

Expected delivery within 24 Hours