1. Homepage
  2. Programming
  3. CS576 Multimedia Systems Design - Assignment 2: Color Theory and Object Detection

CS576 Multimedia Systems Design - Assignment 2: Color Theory and Object Detection

Engage in a Conversation
USCCS576CSCI576Multimedia Systems DesignColor TheoryObject DetectionC++Object Localization

CS 576 Assignment 2  CourseNana.COM

Assigned on Monday 09/18/2023, CourseNana.COM

Solutions due on Monday 10/09/2023 by midday 12 pm noon CourseNana.COM

Late Policy: None, unless prior arrangement has been made. CourseNana.COM

PART 1: Theory Questions for practice, no need to submit, answers will be posted later. CourseNana.COM

Question1: Color Theory CourseNana.COM

One of uses of chromaticity diagrams is to find the gamut of colors given the primaries. It can also be used to find dominant and complementary colors
Dominant color of a given color D (or dominant wavelength in a color D) is defined as the spectral color which can be mixed with white light in order to reproduce the desired D color. Complementary colors are those which when mixed in some proportion create the color white. Using these definitions and the understanding of the chromaticity diagram that you have, answer the following. CourseNana.COM

into the chromaticity space CourseNana.COM

  • In the image alongside find the dominant wavelength of color D. Show this wavelength. CourseNana.COM

  • Do all colors have a dominant wavelength? Explain your reasoning. CourseNana.COM

  • Find the color which is complimentary to the color C. Show this color CourseNana.COM

    What colors in RGB color space map to the equiluminous point E upon projection CourseNana.COM

Question 2: Color Theory
The chromaticity diagram in (x, y) represents the normalized color matching CourseNana.COM

functions X, Y and Z. Prove that Z = [ (1-x-y)/y ] Y CourseNana.COM

Here you are tasked with mapping the gamut of a printer to that of a color CRT monitor. Assume that gamuts are not the same, that is, there are colors in the printer’s CourseNana.COM

gamut that do not appear in the monitor’s gamut and vice versa. So, in order to print a color seen on the monitor you choose the nearest color in the gamut of the printer. Answer the following questions. CourseNana.COM

  • Comment (giving reasons) whether this algorithm will work effectively? CourseNana.COM

  • You have two images a cartoon image with constant color tones and a real image with varying color tones? Which image will this algorithm perform better give reasons? CourseNana.COM

  • Can you suggest improvements rather than just choosing the nearest color? CourseNana.COM

    Entropy Coding CourseNana.COM

    Consider a communication system that gives out only two symbols X and Y. Assume that the parameterization followed by the probabilities are P(X) = x2 and P(Y) = (1-x2). CourseNana.COM

  • Write down the entropy function and plot it as a function of x CourseNana.COM

  • From your plot, for what value of x does the Entropy become a minimum? At what CourseNana.COM

    values of x is the Entropy a maximum? CourseNana.COM

  • Although the plot visually gives you the value of x for which the entropy in CourseNana.COM

    maximum, can you now mathematically find out the value(s) for which the entropy CourseNana.COM

    is a maximum? CourseNana.COM

  • Can you do the same for the minimum, that is can you find mathematically prove CourseNana.COM

    the value(s) of x for which the entropy is a minimum? CourseNana.COM

    Generic Compression CourseNana.COM

    The following sequence of real numbers has been obtained sampling a signal:
    5.8, 6.2, 6.2, 7.2, 7.3, 7.3, 6.5, 6.8, 6.8, 6.8, 5.5, 5.0, 5.2, 5.2, 5.8, 6.2, 6.2, 6.2, 5.9, 6.3, 5.2, 4.2, 2.8, 2.8, 2.3, 2.9, 1.8, 2.5, 2.5, 3.3, 4.1, 4.9
    This signal is then quantized using the interval [0,8] and dividing it into 32 uniformly distributed levels.
    CourseNana.COM

  • What does the quantized sequence look like? For ease of computation, assume that you placed the level 0 at 0.25, the level 1 at 0.5P, level 2 at 0.75, level 3 at 1.0 and so on. This should simplify your calculations. Round off any fractional value to the nearest integral levels CourseNana.COM

  • How many bits do you need to transmit the entire signal? CourseNana.COM

  • If you need to encode the quantized output using DPCM. Compute the successive CourseNana.COM

    differences between the values what is the maximum and minimum value for the difference? Assuming that this is your range (ie, ignore first value), how many bits are required to encode the sequence now? CourseNana.COM

  • What is the compression ratio you have achieved (ignoring first value)? CourseNana.COM

  • Instead of transmitting the differences, you use Huffman coded values for the differences. CourseNana.COM

    How many bits do you need now to encode the sequence? Show all your work and how you CourseNana.COM

    arrived at the final answer CourseNana.COM

  • What is the compression ratio you have achieved now (ignoring first value)? CourseNana.COM

Programming Part (140 points)
This assignment will help you gain a practical understanding of color representations, color spaces and data structures normally used in color analysis. Detecting and localizing objects in an image is a challenging computational task. The overall problem space is complex and robust solutions in practical scenarios need many computational descriptors and vectors. In this assignment we will explore using color as one such data point to accomplish this. While color representation is only one vector (among others) to help address this problem, we are hopeful that you get a good understanding of color representation and color spaces which is the intent of this assignment. CourseNana.COM

You will be given a small library of object images where each image represents an object. All these images will be in a standard format representing the picture of one colorful object placed against a green background. You may process these images to make color representations of objects. You will be given an input image which contains a combination of objects some of which will be in your library. You need to display your processed output where you need to outline using a bounding box around the area of pixels that match any object detected from the library. You are free to extend the display code sample given of assignment 1 to implement this project. No external libraries or scripting environments are allowed. CourseNana.COM

You program will take a few parameters.
InputImage.rgb This is the input image that contains a one of more of colorful CourseNana.COM

objects some of which (or none of which) will be in your library.
A list of objects object1.rgb object2.rgb ...objectn.rgb which will represent your CourseNana.COM

library of objects.
All the images will be of the same size 640x480.
CourseNana.COM

To invoke your program, we will compile it and run it at the command line as CourseNana.COM

YourProgram.exe InputImage.rgb object1.rgb object2.rgb .... objectn.rgb CourseNana.COM

where the number of objects (objectn.rgb) may vary between 1 to n. Here is an example data set of the input image and library images with an expected output. CourseNana.COM

Object1.rgb Object2.rgb CourseNana.COM

Inputimage.rgb CourseNana.COM

Process and Execution: CourseNana.COM

Object1.rgb CourseNana.COM

Processed output by program CourseNana.COM

The main data structure you will be using is a color histogram. A histogram is a representation of the distribution of data and the frequency of each type of data. For your understanding, given a gray scale single channel image, its associated histogram is illustrated by the example below, where the X axis describes all possible values of a pixel 0-255 and the Y axis gives the number of times the pixel value occurs in the image. CourseNana.COM

A color representation has three channels R, G and B. You may create three one dimensional histograms, one for each channel, or alternatively one three-dimensional histogram. Now that you have understood the histogram representation lets see how to make use of the this for detecting and localizing objects. CourseNana.COM

1. Creating histograms for object images.
The input parameters to your program has a list of objects (from a library). All these object images are given to you against a constant green chroma background. The green chroma background is given so you can conveniently choose pixels that belong to the object. Create multiple histograms for each object image given on the command line list.
CourseNana.COM

2. Creating a histogram of the input image
Given the input image, you may assume that it contains object(s). Create a histogram of the image. At this point you should make note of the fact that the position/orientation/scale of an object in the input image will be very different from its proportions in the object image. This will result in the number of pixels that represent the object in the two images be vastly different, though there is a pattern to the distribution which will be similar in both histograms.
CourseNana.COM

3. Object detection using histogram matching
Given object histograms and the input image histogram, implement a method that will allow you detect the presence of an object histogram in the input image histogram comparing all the channels. Given that color is the main purpose of comparison, you may want to implement this matching algorithm in a space that ignores luminance eg
CourseNana.COM

CourseNana.COM

  • Choice 1 Convent the image from RGB to YUV, and create histograms for U and V. Here you may ignore Y and compare the U&V histograms between the input image and object images. You can read about the color conversion matrix from the class lecture slides. CourseNana.COM

  • Choice 2 - Convent the image from RGB to HSV, and create histograms for H. Here you may ignore S & V and compare the H (hue) histogram between the input image and library image objects. You can read about the color conversion here: https://en.wikipedia.org/wiki/HSL_and_HSV & https://www.cs.rit.edu/~ncs/color/ CourseNana.COM

4. Object Localization
Once you have detected the presence of the object by comparing histograms, you need to highlight the pixels in the image that correspond to the object either by highlighting them or showing a bounding box around them. To achieve this you need to keep track of [x,y] locations of pixels when forming the histogram.
CourseNana.COM

What should you submit? CourseNana.COM

  • Your source code files, and your project file or makefile, if any all combined into a zip archive with your name on the archive. Please do not submit any binaries or images. We will compile your program and execute our tests accordingly. CourseNana.COM

  • If you need to include a readme.txt file with any special instructions on compilation, that is fine too. CourseNana.COM

Get in Touch with Our Experts

WeChat (微信) WeChat (微信)
Whatsapp WhatsApp
USC代写,CS576代写,CSCI576代写,Multimedia Systems Design代写,Color Theory代写,Object Detection代写,C++代写,Object Localization代写,USC代编,CS576代编,CSCI576代编,Multimedia Systems Design代编,Color Theory代编,Object Detection代编,C++代编,Object Localization代编,USC代考,CS576代考,CSCI576代考,Multimedia Systems Design代考,Color Theory代考,Object Detection代考,C++代考,Object Localization代考,USChelp,CS576help,CSCI576help,Multimedia Systems Designhelp,Color Theoryhelp,Object Detectionhelp,C++help,Object Localizationhelp,USC作业代写,CS576作业代写,CSCI576作业代写,Multimedia Systems Design作业代写,Color Theory作业代写,Object Detection作业代写,C++作业代写,Object Localization作业代写,USC编程代写,CS576编程代写,CSCI576编程代写,Multimedia Systems Design编程代写,Color Theory编程代写,Object Detection编程代写,C++编程代写,Object Localization编程代写,USCprogramming help,CS576programming help,CSCI576programming help,Multimedia Systems Designprogramming help,Color Theoryprogramming help,Object Detectionprogramming help,C++programming help,Object Localizationprogramming help,USCassignment help,CS576assignment help,CSCI576assignment help,Multimedia Systems Designassignment help,Color Theoryassignment help,Object Detectionassignment help,C++assignment help,Object Localizationassignment help,USCsolution,CS576solution,CSCI576solution,Multimedia Systems Designsolution,Color Theorysolution,Object Detectionsolution,C++solution,Object Localizationsolution,