ECE 4470 Computer Vision Assignment

Assignment Help MATLAB Programming
Reference no: EM133115223

ECE 4470 Computer Vision - California State University, Bakersfield

Lab: K-Means for Color Segmentation

Goals

• Compare two color spaces (RGB and HSV)
• Use color spaces for segmentation
• Evaluate different distance measures

Technical Approach

Part 1: Color Space Representation Color Space Evaluation

Figure: Image for evaluation

You will need to load in the color image provided "fruit.jpg'. The image is read in using a RGB color space. Using subplot, plot the original image and the respective RGB color channels. Note the datatype and values that are used to represent the RGB color space. Pick out five fruits with different color and evaluate their representation is each color channel. For instance, white is R-high, G-high, B-high.

It will be useful to use the Data Cursor tool to navigate through the data of the image. It is activated using the following symbol: Newer versions renamed the Data Cursor to Data Tips under the Tools menu of a figure window.

Now you will convert your image to the HSV (Hue, Saturation, and Value) color space. Use the rgb2hsv function to convert from RGB. How is HSV represented in MATLAB? Consult the doc file and explain the datatype used. Do the same evaluation you did in the RGB space for the HSV space. Pick the same fruits. Note any differences you see between the two spaces.

Part 2: Color Segmentation

For the five fruit you have chosen we will now use the color domain to attempt segmentation of the specific fruits. To do this we will be using the Euclidean distance function:

d(q,p) = √(Σi=1n(qi - pi)2)

Where q and p are two points on the image and n is the number of dimensions in your color space. Note that this function weights each dimension equally, however this may not always be wanted. To do the segmentation, you will find a representative point in your fruit. After finding a representative you will find the distance of every pixel in the image to that representative. This will give you an image of color differences. Then you can threshold your image with the following.

D % Difference image for color space.

Fruit = zeros(size(D));

Fruit (D < T) = 1;

This will give an image where the image is one where the distance is less than T and zero if it is greater than T. You will need to find an optimal T and dimensions for each fruit. You may only need to use one dimension for some fruits, this will come from your evaluation in part one. Do this evaluation for all 5 fruits and for both color spaces. Remember what is represented in the HSV space, in some cases you may only need H or S. Usually V will not be needed. Note which fruits had error and why.

How did both color spaces fair in the segmentation? Was one of them clearly better? Explain.

Is there a better distance measure for completing these segmentations? If so, explain why it is better.

Attachment:- Computer Vision.rar

Reference no: EM133115223

Questions Cloud

What is the accrual accounting rate of return : The estimated useful life is 10 years, with no salvage value. Amaro's minimum expected return is 14 percent. What is the accrual accounting rate of return
Why the purchasing power parity may not hold in reality : Discuss why the purchasing power parity may not hold in reality.
How many years is the annuity : An annuity pays $100 each year. It is worth $507.57 today. The annual interest rate is 5 percent. How many years is the annuity?
Find the price of a call option on the stock : Find the price of a call option on the stock that has a stock price of $14 and that expires in 6 months. (Hint: Use daily compounding.)
ECE 4470 Computer Vision Assignment : ECE 4470 Computer Vision Assignment Help and Solution, California State University, Bakersfield - Assessment Writing Service
Determine the machines second year depreciation : The machine's useful life is estimated to be 5 years, or 210,000 units of product, Determine the machines second year depreciation
Healthcare leadership skills : List each step of the decision making process. Include the importance of each step of the decision-making process
Determine the overhead variance : During the year, 40,000 direct labor hours were worked. Actual overhead costs for the year were $340,000. Determine the overhead variance
Expected return and standard deviation : Consider two stocks, Stock D, with an expected return of 11 percent and a standard deviation of 26 percent, and Stock I, an international company, with an expec

Reviews

Write a Review

MATLAB Programming Questions & Answers

  Finite difference method

Use the finite difference method to calculate the temperature at the point specified since it is easier.

  Determine the necessary shell temperature

In a shell-and-tube heat exchanger, one fluid passes through a central tube while another fluid flows through an outer shell in the opposite direction. The purpose is to heat the fluid passing through the central tube.

  Find the integral of a function at an arbitrary location

Write a Matlab function to perform numerical integration of a set of evenly spaced data points using the trapezoidal rule

  Compute the speed of single-stage planetary gear train

Write a MATLAB function [speed] = planetary (N, emesh, first, last, arm) that computes the speed of a given link in a single-stage planetary gear train.

  Calculate and plot the error in the numerical derivative

Write a program to calculate and plot the error in the numerical estimate of the derivative.

  Create the graph using matlab functions

Create the graph, which contains a piecewise function where a line exists in the first interval, a parabola in the second interval, and the sine function in the third interval.

  Develop a simulation program

Develop a simulation program

  Create a vector in matlab

Create a three dimensional diagram of function.

  Open a named pipe and to read data from the pipe

Open a named pipe and to read data from the pipe in matlab

  Write the commands that will create the matrix

Write the commands that will create the matrix.

  Lagrange interpolating polynomial of degree

Lagrange interpolating polynomial of degree

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd