Skip to content

Commit fb54371

Browse files
Updated
1 parent 36af354 commit fb54371

File tree

1 file changed

+42
-1
lines changed

1 file changed

+42
-1
lines changed

README.md

Lines changed: 42 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,43 @@
11
# Opencv-Python-Computer-Vision
2-
Various techniques implemented used in Computer Vision Python.
2+
3+
### Color-Based-CBIR-System
4+
5+
##### Steps taken to implement a CBIR system:
6+
1. Define your image descriptor and create imagebase for training.
7+
2. Train your imagebase over the defined descriptor and save feature vector.
8+
3. Create a search file to search/rank the images when tested against query.
9+
4. Create testing file to test against saved feature vector for imagebase.
10+
11+
This folder includes files:
12+
- featureVector.py
13+
This file contains code for color histogram feature extraction, that return a numpy vector.
14+
- training.py
15+
This file trains imagebase over our featureVector and save the output in **trainingdata.pickle**.
16+
- search.py
17+
This file is used with testing where it helps in searching/matching featureVectors for test images and trained images.
18+
- testing.py
19+
This file is used for testing our system.
20+
21+
22+
### 4 Point Perspective Transform
23+
24+
##### Steps to find the maximum sized 4 point image (considering only (possibility) rectangle):
25+
1. Find edges of the image using canny edge detection.
26+
2. Supply the edges to the countour function to find all possible contours.
27+
3. Sort these countours (coordinates) in non-increasing fashion.
28+
4. Check for 4 point countour, from the start of the returned list of countours.
29+
5. Pass these 4 points to transform function.
30+
31+
##### Steps involved:
32+
1. First of all take image and 4 points you need to transform over a perspective space.
33+
2. Order those points in following fashion - [top-left, top-right, bottom-right, bottom-left] - using basic coordinate math.
34+
3. Calculate the maxWidth and maxHeight for the perspective window, to fit the 4 point image.
35+
4. Calculate perspective matrix (3x3) over given image and points.
36+
5. Wrap the perspective over the perspective window.
37+
38+
39+
###
40+
41+
42+
43+
###### Special thanks to [Adrian Rosebrock](https://www.pyimagesearch.com/about/) for an amazing tutorial and giving inspiration to work on computer vision.

0 commit comments

Comments
 (0)