1. Blur image (to identify overall structure, and not focusing on text itself) 2. Create threshold (and kernal) to separate text block 3. Perform dilation (~white thickening) 4. Perform contour (finding boundaries) 5. Perform loop to only draw boundrary box of specific size (to exclude small bbox)
I guess, there is an error in your code. From minute 15:45 on, you define the ROI. However, instead of x+h, w would have to be added to x. Therefore, roi should be defined as: roi = image[y:y+h, x:x+w] Since this typo also appears on your GitHub you should change it there as well. Kind regards!
Hi, this tutorial series has been the best thing slince sliced bread, and honestly dont know where id be with out it however i am stumped, im trying to read pdfs into jpeg format, the problem arises when i have tables and images within these files that i would like to either skip or try to read into file with out wreacking structure (obviouslty not images within the images). idealy i would like this process to be automated as the final program is not being used by myself but by others less aquainted with technolagy. As of now there is no documentation i can find that helps facilitate this. i know its a long shot but honestly ive hit a wall and if by some chance anyone can help and guidence would or advice would mean the world
I actually found the solution if you're still interested: you basically need to crop the image so no extra blank spaces are left. Since mine was a vertical page I used this code - image[10:1060, 670:1250] image[start_row:end_row, start_column:end_column]
Short question: in Box [15] it reads "else cents[1]". Is this a typo and should be "else cnts[1]" or did I miss something? But great content! Keep going!
At 15:29, after adding the "if h > 200 and w > 20:" statement, I am still getting the same result as without the if statement. Any idea why this is happening? I changed variable names, defined the contours again, but still the same result.
at 11:16 I have an error, can you tell me how to fix it? Thank you! error: OpenCV(4.7.0) :-1: error: (-5:Bad argument) in function 'boundingRect' > Overload resolution failed: > - array is not a numerical tuple > - Expected Ptr for argument 'array'
I am trying to run this in google colab but getting an error: TesseractNotFoundError: C:\Program Files\Tesseract-OCR is not installed or it's not in your PATH. See README file for more information. How to resolve this? I have already added pytesseract in my env variables
Hi, can you please tell how I can have bounding boxes around each question in any question paper? I have tried a lot, but unable to get it. I would be really glad if you could help me..Thanks!
It could be used in the source code of an application, or used on different operating systems. Imports and syntax would vary by language and implementation.
I am sorry, but you keep saying that i explained these things on the previous videos, and i watched all of the previous ones and all you did was copy code and paste it into your juypter notebook without any proper explanation, hope you can provide a newer tutorial, otherwise thanks for the tutorials.
1. Blur image (to identify overall structure, and not focusing on text itself)
2. Create threshold (and kernal) to separate text block
3. Perform dilation (~white thickening)
4. Perform contour (finding boundaries)
5. Perform loop to only draw boundrary box of specific size (to exclude small bbox)
The opencv was so easy to understand!
Thanks for such a simplified explanation, helped me with my ongoing project a lot!
This is the one I have been looking for. Thank you so much!
No problem !
Thank you so much, this really helped me make progress on a project!
I guess, there is an error in your code. From minute 15:45 on, you define the ROI. However, instead of x+h, w would have to be added to x. Therefore, roi should be defined as: roi = image[y:y+h, x:x+w]
Since this typo also appears on your GitHub you should change it there as well.
Kind regards!
why can't you provide the code for this
Very nice video helped me a lot.
Excellent! Glad it helped!
Hi, this tutorial series has been the best thing slince sliced bread, and honestly dont know where id be with out it
however i am stumped, im trying to read pdfs into jpeg format, the problem arises when i have tables and images within these files that i would like to either skip or try to read into file with out wreacking structure (obviouslty not images within the images). idealy i would like this process to be automated as the final program is not being used by myself but by others less aquainted with technolagy. As of now there is no documentation i can find that helps facilitate this.
i know its a long shot but honestly ive hit a wall and if by some chance anyone can help and guidence would or advice would mean the world
It's not finding the sections for me. It captures the whole document as a section. Any suggestions?
Did you find the solution?
I actually found the solution if you're still interested: you basically need to crop the image so no extra blank spaces are left. Since mine was a vertical page I used this code - image[10:1060, 670:1250] image[start_row:end_row, start_column:end_column]
Short question: in Box [15] it reads "else cents[1]". Is this a typo and should be "else cnts[1]" or did I miss something?
But great content! Keep going!
i assume its typo
good job man!!!
Thanks
At 15:29, after adding the "if h > 200 and w > 20:" statement, I am still getting the same result as without the if statement. Any idea why this is happening? I changed variable names, defined the contours again, but still the same result.
rerun the whole code again
will this work on colored images as well , if not, what changes should I make for the colored images?
Great Thanks !!
at 11:16 I have an error, can you tell me how to fix it? Thank you!
error: OpenCV(4.7.0) :-1: error: (-5:Bad argument) in function 'boundingRect'
> Overload resolution failed:
> - array is not a numerical tuple
> - Expected Ptr for argument 'array'
fixed by adding a variable, because findContours creates 2 outputs.
cnts, new_variable = cv2.findContours(dilate, cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_SIMPLE)
MAGIC
I am trying to run this in google colab but getting an error: TesseractNotFoundError: C:\Program Files\Tesseract-OCR is not installed or it's not in your PATH. See README file for more information. How to resolve this? I have already added pytesseract in my env variables
I can't download the images from the course can you help me so that I can practice this
@Python tutorials for digital humanities can you explain how to make bounding box using pixel location?
Hi, can you please tell how I can have bounding boxes around each question in any question paper? I have tried a lot, but unable to get it. I would be really glad if you could help me..Thanks!
كيف يمكن عرض اشكال مطبوعة ف صورة ممسوحة ضوئيا الى ملفdocx
could you please make a video on handwritten scanned document image line segmentation
Sure! I actually wrote that code a year or so ago. I will try and dig it up and make a video on it.
@@python-programming Thank you so much..
dude, do you have experience in aligned text?
Can I ask this is capable to application or only for desktop..? Im asking because this is same on my title thesis.
It could be used in the source code of an application, or used on different operating systems. Imports and syntax would vary by language and implementation.
*i Love u so much tks u*
I am sorry, but you keep saying that i explained these things on the previous videos, and i watched all of the previous ones and all you did was copy code and paste it into your juypter notebook without any proper explanation, hope you can provide a newer tutorial, otherwise thanks for the tutorials.