Question

Given an image of a puck, write a program to get a white outline around the blue object. Save and...

Given an image of a puck, write a program to get a white outline around the blue object.
Save and display the image with the outline. The outline should be approximately similar
to the test case outputs shown below. Hint: Use binary image.

LANGUAGE : MATLAB ~~~~~ MATLAB ~~~~~~~~~MATLAB

0 0
Add a comment Improve this question Transcribed image text
Answer #1

//read image and display

I=imread('image.pmg');

imshow(I)

//convert to binary image

BW=im2bw(I);

imshow(BW)

//determine row and column

dim=size(BW)

col=round(dim(2)/2)-90;

row=min(find(BW(:,col)))

imshow(I)

hold on;

plot(boundary(:,2),boundary(:,1),'w','Linewidth',3);

Add a comment
Know the answer?
Add Answer to:
Given an image of a puck, write a program to get a white outline around the blue object. Save and...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • 2. Write a Matlab program for bitmapped images and display any image on the surface of object in ...

    2. Write a Matlab program for bitmapped images and display any image on the surface of object in two ways b) In figure 2 the expected result is shown any image taken should rotate on sphere surface in 3 Dimensions File Edit View InsertTools Desktop Window Help Figure 2 2. Write a Matlab program for bitmapped images and display any image on the surface of object in two ways b) In figure 2 the expected result is shown any image...

  • P, write a Matlab program for bitmapped images and display any image on the surface of object in ...

    p, write a Matlab program for bitmapped images and display any image on the surface of object in two ways b) In figure 2 the expected result is shown any image taken should rotate on sphere surface in 3 Dimensions File Edit View Insert Tools Desktop Window Help Figure 2 p, write a Matlab program for bitmapped images and display any image on the surface of object in two ways b) In figure 2 the expected result is shown any...

  • Write a MATLAB script to generate a 512 × 512 test image consisting of a white...

    Write a MATLAB script to generate a 512 × 512 test image consisting of a white circle against a black background, use this image as an input to the fft2 function, and display the resulting spectrum. You should be able to notice the presence of “ringing” artifacts in the resulting spectrum, owing to the sharp transitions between the circle and the background. Andimplement the solution to the ringing artifact, while keeping the input image similar to the original (white circle...

  • NOTE: Write the Program in python as mentioned below and use while loop and flags as...

    NOTE: Write the Program in python as mentioned below and use while loop and flags as necessary. And please write the code following the program description given below. Directions: Read the program description below carefully. All requirements must be met by your program to receive full credit. Thus, pay particular attention to input and output requirements, structural requirements, and so on. Furthermore, code that contains syntax errors will not receive any credit, so be sure that your code interprets correctly...

  • Using basic c++ write 2 separate codes for this assignment. Program #1 Write a program that...

    Using basic c++ write 2 separate codes for this assignment. Program #1 Write a program that calculates the average of a group of test scores, where the lowest score in the group is dropped. It should use the following functions. • void getScore() should ask the user for a test score, store it in the reference parameter variable, and validate it. This function should be called by the main once for each of the five scores to be entered. •...

  • NOTE: Write the Program in python as mentioned below and use while loop and flags as...

    NOTE: Write the Program in python as mentioned below and use while loop and flags as necessary. And please write the code following the program description given below. DON'T use Function concept or any other concept except while loop,if-else. Directions: Read the program description below carefully. All requirements must be met by your program to receive full credit. Thus, pay particular attention to input and output requirements, structural requirements, and so on. Furthermore, code that contains syntax errors will not...

  • WRITE A C++ PROGRAM TO ANSWER THE QUESTIONS BELOW. You are provided with an image in...

    WRITE A C++ PROGRAM TO ANSWER THE QUESTIONS BELOW. You are provided with an image in a new file format called JBC Here is an example of the format: 2 3 100 50 40 200 66 56 12 45 65 23 67 210 0 255 100 45 32 123 The first line means that this is a 2 (width) by 3 (height) image of pixels. Then, each line represents the color of a pixel. The numbers are from 0 to...

  • Homework description::::: Write JAVA program with following description. Sample output with code will be helful... A...

    Homework description::::: Write JAVA program with following description. Sample output with code will be helful... A compiler must examine tokens in a program and decide whether they are reserved words in the Java language, or identifiers defined by the user. Design a program that reads a Java program and makes a list of all the identifiers along with the number of occurrences of each identifier in the source code. To do this, you should make use of a dictionary. The...

  • Create a program SearchNewBooks.cc that given as command line input newbooks.dat and request.dat and a method...

    Create a program SearchNewBooks.cc that given as command line input newbooks.dat and request.dat and a method of search either binary or linear, creates a file of the number of books found from the request list. program should receive two filenames as command line arguments, the new books file and request file, which the program should read in. The list of new books and list of requested books should should be stored in only two ​std::vector​ containers. Because some code to...

  • In c++ The iron-puzzle.ppm image is a puzzle; it contains an image of something famous, howeve...

    In c++ The iron-puzzle.ppm image is a puzzle; it contains an image of something famous, however the image has been distorted. The famous object is in the red values, however the red values have all been divided by 10, so they are too small by a factor of 10. The blue and green values are all just meaningless random values ("noise") added to obscure the real image. If you were to create a grayscale image out of just the red...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT