# OpenCV shape\_example

**URL:** https://forum.opencv.org/t/opencv-shape-example/3500
**Category:** C++
**Tags:** shape
**Created:** [May 24, 2021, 9:19am UTC](https://forum.opencv.org/t/opencv-shape-example/3500 "2021-05-24T09:19:22Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![wulicheng](https://avatars.discourse-cdn.com/v4/letter/w/9de053/32.png) [@wulicheng](https://forum.opencv.org/u/wulicheng)
#### Post date: [May 24, 2021, 9:19am UTC](https://forum.opencv.org/t/opencv-shape-example/3500/1 "2021-05-24T09:19:22Z")

</div>

I know the ShapeContextDistanceExtractorImpl::computeDistance(InputArray contour1, in sc\_dis.cpp, and I have tried the exmaple of “OpenCV shape\_example”, But I does not know the algorithm。Can anyone give me an annotation of the function. Or specify document of the function. thanks!

---

<div class="post-metadata">

### Author: ![laurent.berger](https://avatars.discourse-cdn.com/v4/letter/l/ec9cab/32.png) [@laurent.berger](https://forum.opencv.org/u/laurent.berger)
#### Post date: [May 24, 2021, 11:57am UTC](https://forum.opencv.org/t/opencv-shape-example/3500/2 "2021-05-24T11:57:49Z")

</div>

Hi  
May be [this](https://docs.opencv.org/master/d8/de3/classcv_1_1ShapeContextDistanceExtractor.html#details)

Implementation of the Shape Context descriptor and matching algorithm.

proposed by Belongie et al. in “Shape Matching and Object Recognition Using Shape Contexts” (PAMI 2002). This implementation is packaged in a generic scheme, in order to allow you the implementation of the common variations of the original pipeline.
