View Code? Open in Web Editor
NEW
A Box detection algorithm for any image containing boxes.
Home Page: https://medium.com/@kananvyas/a-box-detection-algorithm-for-any-image-containing-boxes-756c15d7ed26
License: GNU General Public License v3.0
Python 6.06%
Jupyter Notebook 93.94%
boxdetection's Issues
hi, i need to extract the two red boxe and i would use your code to do it but when i execute it i have a bad result. Down here my image
Even if i extracted one only big red boxe instead of two smaller, it's ok still.
Can you please help me?
Can you please tellme how to extract text using co-ordinates of the rectangular box?
I tried varying the kernel length for the same.
I run the same code for different pic image but I cannot see any image being created in Cropped folder
May seem obvious for somewhat seasoned developers.
But cv2 isn't installed by default.
A requirements.txt
with the dependencies would already help a lot in setting up a virtual environment & getting started quicker.
Hi, I encounter a problem where a line is recognized as 2 separate lines, so it gives trouble for the contour recognition. Do you have some suggestions on how can we handle this?
Find contours for image, which will detect all the boxes
im2, contours, hierarchy = cv2.findContours(img_final_bin, cv2.RETR_TREE,cv2.CHAIN_APPROX_SIMPLE)
ValueError: not enough values to unpack (expected 3, got 2)
its working for me for some images and not working for all
here in the image it may have one circle shape and two or three rectangle boxes and in that three i need the bigger one.
if there is only one rectangle its getting but when there is two or more it giving another rectangle of different size.
Please see attached image and output is
My aim is to extract each box then read a number from it if it is not empty .
Can you suggest ?
Thanks.
Better if you add requirements file to resolve dependency issues.