Download - Shape context
![Page 1: Shape context](https://reader033.vdocuments.site/reader033/viewer/2022061506/5584a88dd8b42afd5b8b4b99/html5/thumbnails/1.jpg)
04/13/23 1
Shape Context
Rocío Cabrera u1908272
Vanya Valindria u1908259
![Page 2: Shape context](https://reader033.vdocuments.site/reader033/viewer/2022061506/5584a88dd8b42afd5b8b4b99/html5/thumbnails/2.jpg)
13/04/23 2
Introduction
Can you guess what number it is?
![Page 3: Shape context](https://reader033.vdocuments.site/reader033/viewer/2022061506/5584a88dd8b42afd5b8b4b99/html5/thumbnails/3.jpg)
Objectives
“Have descriptors that can be computed in one image and used to find corresponding points, if visible, in another image.”
“Given a query model image, to develop an algorithm capable of retrieving similar-shaped images from an extensive database”
13/04/23 3
![Page 4: Shape context](https://reader033.vdocuments.site/reader033/viewer/2022061506/5584a88dd8b42afd5b8b4b99/html5/thumbnails/4.jpg)
Process Stages
13/04/23 4
Solve the correspondence problem between
the two shapes
Use the correspondences to estimate an
aligning transform
Compute the distance between
the two shapes
Evaluate the distance and classify the
shape
. .... ??
![Page 5: Shape context](https://reader033.vdocuments.site/reader033/viewer/2022061506/5584a88dd8b42afd5b8b4b99/html5/thumbnails/5.jpg)
SHAPE CONTEXT“A novel approach to measuring similarities between shapes and exploit it for object classification/recognition”
13/04/23 5
![Page 6: Shape context](https://reader033.vdocuments.site/reader033/viewer/2022061506/5584a88dd8b42afd5b8b4b99/html5/thumbnails/6.jpg)
Shape Context Computation
13/04/23 6
Step 1. Obtain from ShapeP and ShapeQ n-samples uniformly spaced taken from their edge elements
![Page 7: Shape context](https://reader033.vdocuments.site/reader033/viewer/2022061506/5584a88dd8b42afd5b8b4b99/html5/thumbnails/7.jpg)
Shape Context Computation
13/04/23 7
Step 2. Compute the Euclidean distance (r) and the angle (θ) from each point in the set to all the other n-1 points. Normalize r by the median distance (λ) and measure the angle relative to the positive x-axis.
![Page 8: Shape context](https://reader033.vdocuments.site/reader033/viewer/2022061506/5584a88dd8b42afd5b8b4b99/html5/thumbnails/8.jpg)
Shape Context Computation
13/04/23 8
Step 3. Compute the log of the r vector.Discretize the distance and angle measurements
![Page 9: Shape context](https://reader033.vdocuments.site/reader033/viewer/2022061506/5584a88dd8b42afd5b8b4b99/html5/thumbnails/9.jpg)
Shape Context Computation
13/04/23 9
Step 4. For each origin point, capture number of points that lie a given θ,R bin.
Each shape context is a log-polar histogram of the coordinates of the n-1 points measured from the origin reference point.
![Page 10: Shape context](https://reader033.vdocuments.site/reader033/viewer/2022061506/5584a88dd8b42afd5b8b4b99/html5/thumbnails/10.jpg)
Shape Context Computation
Shape context of the sample points in ShapeP and ShapeQ.
13/04/23 10
![Page 11: Shape context](https://reader033.vdocuments.site/reader033/viewer/2022061506/5584a88dd8b42afd5b8b4b99/html5/thumbnails/11.jpg)
Matching Shape Contexts
How can we assign the sample points of ShapeP to correspond to those of ShapeQ?
Determining shape correspondences such that:
1. Corresponding points have very similar descriptors
2. The correspondences are unique
13/04/23 11
![Page 12: Shape context](https://reader033.vdocuments.site/reader033/viewer/2022061506/5584a88dd8b42afd5b8b4b99/html5/thumbnails/12.jpg)
Matching Shape Contexts
Define matching cost function
Shape context Distance between the two normalized histograms
Local appearance Dissimilarity of the tangent angles
13/04/23 12
![Page 13: Shape context](https://reader033.vdocuments.site/reader033/viewer/2022061506/5584a88dd8b42afd5b8b4b99/html5/thumbnails/13.jpg)
13/04/23 13
Matching Shape Contexts
13/04/23 13
![Page 14: Shape context](https://reader033.vdocuments.site/reader033/viewer/2022061506/5584a88dd8b42afd5b8b4b99/html5/thumbnails/14.jpg)
Modeling Transformation
Given a set of correspondences, estimate a transformation that maps the model into the target
Euclidean transformation
Affine model
Thin Plate Spline (TPS)
13/04/23 14
![Page 15: Shape context](https://reader033.vdocuments.site/reader033/viewer/2022061506/5584a88dd8b42afd5b8b4b99/html5/thumbnails/15.jpg)
Classification/Recognition
This enables a measure of shape similarity The dissimilarity between two shapes can be computed
as the sum of matching errors between corresponding points, together with a term measuring the magnitude of the aligning transform
Given a dissimilarity measure, a k-NN technique can be used for object classification/recognition
13/04/23 15
![Page 16: Shape context](https://reader033.vdocuments.site/reader033/viewer/2022061506/5584a88dd8b42afd5b8b4b99/html5/thumbnails/16.jpg)
Method Evaluation
Advantages Incorporates invariance to:
Translation
Scale
Rotation
Occlusions
Drawbacks Sensitive local distortion or
blurred edges
Problems in cluttered background
13/04/23 16
![Page 17: Shape context](https://reader033.vdocuments.site/reader033/viewer/2022061506/5584a88dd8b42afd5b8b4b99/html5/thumbnails/17.jpg)
Applications
Digit recognition
Silhouette similarity-based retrieval
3 D object recognition
Trademark retrieval
13/04/23 17
![Page 18: Shape context](https://reader033.vdocuments.site/reader033/viewer/2022061506/5584a88dd8b42afd5b8b4b99/html5/thumbnails/18.jpg)
Database for Digit Recognition
MNIST datasets of handwritten digits:
60,000 training and 10,000 test digits
Links:
http://yann.lecun.com/exdb/mnist/
13/04/23 18
![Page 19: Shape context](https://reader033.vdocuments.site/reader033/viewer/2022061506/5584a88dd8b42afd5b8b4b99/html5/thumbnails/19.jpg)
Database for Silhouette
MPEG-7 shape silhouette database (Core Experiment CE-Shape-1 part B)
1400 images: 70 shapes categories and 20 images per category
Links:
http://mpeg.chiariglione.org/standards/mpeg-7/mpeg-7.htm
13/04/23 19
![Page 20: Shape context](https://reader033.vdocuments.site/reader033/viewer/2022061506/5584a88dd8b42afd5b8b4b99/html5/thumbnails/20.jpg)
Database for 3-D object recognition
COIL-20 database
20 common household objects; turned every 5˚ for a total of 72 views per object
Links:
http://www1.cs.columbia.edu/CAVE/software/softlib/coil-20.php
13/04/23 20
![Page 21: Shape context](https://reader033.vdocuments.site/reader033/viewer/2022061506/5584a88dd8b42afd5b8b4b99/html5/thumbnails/21.jpg)
Database for Trademark retrieval
300 different real-world trademark
13/04/23 21
![Page 22: Shape context](https://reader033.vdocuments.site/reader033/viewer/2022061506/5584a88dd8b42afd5b8b4b99/html5/thumbnails/22.jpg)
MATLAB DEMO
13/04/23 22
![Page 23: Shape context](https://reader033.vdocuments.site/reader033/viewer/2022061506/5584a88dd8b42afd5b8b4b99/html5/thumbnails/23.jpg)
Conclusions
The shape context method is simple to implement yet it is a rich shape descriptor
The methodology makes it invariant to translation, scale and rotation
Useful tool for shape matching and recognition
13/04/23 23