May 8, 2014 at 7:42 am #4882keaganParticipant
My name is Keagan Subban.
Please can u guys assist me with the following algoritm or some help to get it done. I am only familiar with the strel, bwperim, imdilate and bwlabel functions.
Please assist me.
Given a colour image containing a variety of shapes your algorithm should be able to detect and classify the distinct shapes.
Your shape detection algorithm should be able to detect the following shapes:
The final algorithm must output 3 images:
1. A binary (black and white) image with all the shapes in white and background in black. In addition, a number, indicating the classification according to the above numbered descriptors, must be inserted in the centre of each shape. A value of zero (0) should be placed in the centre of the shape that does not fall into one of the above classifications.
2. A colour image with each shape displayed in a pre-assigned colour i.e. instead of inserting a number into each shape they can be displayed in different colours e.g. blue for all circles and yellow for all hexagons. The colour black must be assigned to all unclassified shapes. The background of this image must be white.
3. A binary (black and white) image with all the shapes in white and background in black. In addition, a number, indicating the area (in m2 and 3 decimal places), must be inserted in the centre of each shape in the image. A text value of “N/A” should be placed in the centre of the shape that does not fall into one of the above classifications. Assume each pixel represents a distance of 1 mm.May 10, 2014 at 3:52 am #11709SHAH DISHANT H.Participant
For shape detection, we must do two things.
1. Create database of ur all shapes in .MAT file.
2. Decide way of detection.
We have two options for that.
1. Using eigen values of the database and captured images we can find out the shape.
2. Using inbuilt function corr2 we can get the detected shape.
After the shape has been detected than we can convert it into binary, gray scale, histogram etc. as per the requirements.May 10, 2014 at 8:01 am #11715keaganParticipant
Thanks for reply. I have been doing some research on this. I have extracted rgb, I am have a problem with figuring the shape ratios. I need to detect like nine shapes in my test image and put a number at the centre of the shape. Like all squares with number one in centre, all trinagles number two in centre and up to nine for nine shapes. I want to know if you can help me with what ratios represent what shape. Output image will be black background and shapes in white.
if abs(allRatios-1.12) < 0.2
shape = ‘triangle’;May 26, 2014 at 5:37 am #11767SHAH DISHANT H.Participant
We can try for that. But can you pls tell me whether u have finished with shape detection perfectly ?
Once it is done, let me know how u have done it with code.
I will see and figure out how we can do it..
- You must be logged in to reply to this topic.