Next step for Tiny Project is about image processing to recognize KiWi characteristic.


1. recognize a KiWi from a still image

2. Extract the characteristic like aspect ratio, size, and shape as a ideal good product

3. Calculate a score from the data


OpenCV and Python have already provided a simple way for image processing.


1. Make a image blur
2. change the color space to gray
3. extract object based on threshold
4. extract contours
5. decide a biggest object from contours set

6. Extract the characteristics

 

 

 

 

Script result

root@kjpark-F9SG:/home/kjpark/code/Python/imageprocessing# python outline.py
Peri : 1950
Peri : 332
solidity 0.993691436532
virtual ellipse
((346.2395935058594, 585.294677734375), (539.5545043945312, 630.1558837890625), 161.14199829101562)
((346.4705810546875, 592.38232421875), (539.6417846679688, 621.376220703125), -14.03624439239502)
virtual box
[[160 959]
 [  9 356]
 [532 225]
 [683 828]]
aspect ratio
0.918367346939

 

 Examplel of Image Processing

 

 

 

 

Example Python Source code

https://bitbucket.org/ThereSedew99/codes/raw/48c87ac2b77b9b6adb58dffa9f5724a54341b78c/Python/imageprocessing/outline.py


 


 

Refernces :

http://embedonix.com/articles/image-processing/installing-opencv-3-1-0-on-ubuntu/

http://opencv-python-tutroals.readthedocs.org/en/latest/py_tutorials/py_imgproc/py_contours/py_contour_properties/py_contour_properties.html

http://pythontips.com/2015/03/11/a-guide-to-finding-books-in-images-using-python-and-opencv/

반응형

+ Recent posts