# Identify contours on boxes so that I can deskew for EasyOCR

**URL:** <https://forum.opencv.org/t/identify-contours-on-boxes-so-that-i-can-deskew-for-easyocr/18803>\
**Category:** Python\
**Tags:** ocr\
**Created:** [September 23, 2024, 11:46pm UTC](https://forum.opencv.org/t/identify-contours-on-boxes-so-that-i-can-deskew-for-easyocr/18803 "2024-09-23T23:46:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![diggooddog](https://avatars.discourse-cdn.com/v4/letter/d/f04885/32.png) [@diggooddog](https://forum.opencv.org/u/diggooddog)\
**Post date:** [September 23, 2024, 11:46pm UTC](https://forum.opencv.org/t/identify-contours-on-boxes-so-that-i-can-deskew-for-easyocr/18803/1 "2024-09-23T23:46:34Z")

</div>

Appreciate some help please. I have been working on this for a month but cant seem to get anywhere. I checked multiple stackoverflow/blog posts, have started a course in computer vision and completed the OpenCV section but still getting nowhere.

I am trying to read the labels on boxes on a pallet in a warehouse - image below. EasyOCR does OK on the raw image and grayscale and much worse with any other pre-processing steps. I understand I need to deskew to improve results but struggling to find the individual boxes edges or even the overall edges of the pile of boxes. Any thoughts / help would be appreciated please.

 ![tasti1](https://us1.discourse-cdn.com/flex020/uploads/opencv/original/2X/8/8330dfb28f29b2ce55c5ae132eb353ecbd15a349.jpeg)

I see in the following post the author was recommended to try a neural network approach. Is there anything I can do in OpenCV or should I scrap what I have done and look at neural networks/ YOLO/ SSD?

> [@Best way to detect containers and OCR in imperfect real life images?](https://forum.opencv.org/t/best-way-to-detect-containers-and-ocr-in-imperfect-real-life-images/10329):
>
> Hello, this is my first post. I am trying to use OpenCV in Python to prepare images for OCR with Tesseract. I have been struggling for more than 2 weeks to get something working and must now admit that I am in over my head. I am hoping someone can offer general advice about how to approach this, as my whole approach is likely flawed and that’s why I’m having so much trouble. Here are some details about the application: The images will be all of doors of shipping containers and they could be a…
