Category: Uncategorized

  • Post 7 – Furious 7

    To finalise making the algorithm more generic, I’ve taken a new approach to the thresholding step I used to help identify the corners.

    Instead of a single step, I repeatedly loop through and attempt to identify the corners with an increasing threshold. The loop ends either when 4 corners are identified, or a maximum have been reached

    This allows a higher chance of being able to warp the receipt. Though, if a receipt cannot be identified (I.e. Not all four corners can be found), the original image is passed on to the next stages implemented by Dáithí and Jim.

    This marks the end of this project, which was quite fun. I really enjoy new challenges and a non-ML approach to image processing was really fun!

    Huge thanks to Jack O’Neill and Jane Courtney for the module, as well as Dáithí O’Flynn and Jim Lawlor for being the best teammates one could wish for.

    An example of another receipt being straightened

    As well as a receipt that didn’t need much warping

  • Post 6 – Fast and Furious 6

    With corner identification, it will be possible to start transforming the image so the corners are perpendicular to eachother and the receipt is square.

    With other academic work ramping up, integration of the corner identification with the warping to make the receipt square is a bit slower than normal.

    I have partial functionality that works on only one of our test receipts but need to work on making it more generic and accept different inputs.

    The lab work on ‘Features’ this week will really help with improving the accuracy of this algorithm.

    Here, you can see the algorithm after straightening

  • Post 5 – Fast Five

    It’s been a hectic week! But we’ve properly delegated our tasks got cracking on our tasks.

    In my case, I’m focusing on the receipt identification and squaring.

    This will be built upon the Maxims I discussed in Post 3,

    • A receipt has at most 4 corners
    • There may be as little as 0 and as many as 4 corners in a photo
    • The corners may not be 90 degrees (torn)
    • Receipts may not be perfectly flat
    • A receipt is a quadrilateral and the 4 sides are 90 degrees from their neighbours

    With these maxims, I will be working on identifying the receipt itself, getting the corners, getting the sides, then working on squaring up the receipt for the future processing steps.

    OpenCV has methods for transforming a perspective once corners have been found. I’ve already discussed about how I’m doing corner identification in a previous post, but I’m using the warpPerspective() method[1] found in CV2 with the 4 corners.

    [1] ‘Perspective Transformation – Python OpenCV’, GeeksforGeeks. Accessed: Nov. 25, 2025. [Online]. Available: https://www.geeksforgeeks.org/python/perspective-transformation-python-opencv/

  • Post 4 – Fast & Furious

    This week was spent primarily researching the best methods to do corner identification, which I did through the arcLength() and approxPolyDP() methods within OpenCV.

    Work done in the lab this week also helped us learn about ROI which will help with text detection

    A lot of our work has been done independently, but we also scheduled time next week to work together in person, which would allow us to improve eachother’s work and begin integration

    [1] amras, ‘Answer to “cv2.approxPolyDP() , cv2.arcLength() How these works”’, Stack Overflow. Accessed: Nov. 25, 2025. [Online]. Available: https://stackoverflow.com/a/62274558

  • Post 3 – The Fast and the Furious: Tokyo Drift

    It is trivial to just throw an image into an OCR library, so there is additional work that we need to do to get it ready.

    Most notably, squaring the receipt, cropping, and making the text itself more visible through posterising & sharpening.

    We plan to build a system for identifying and squaring the receipt. To do this, I wrote a set of rules or ‘maxims’ for how a receipt may appear, so we can factor these in when doing the identification / pre-processing:

    1. A receipt as at most 4 corners
    2. In the photo, there may be as few as 0 and as many as 4 corners of the receipt
    3. Some, but not all corners will be exactly 90 degrees
    4. The receipt may not be entirely flat

    There will probably be more rules that appear over time, but this helps us identify and process receipts that:

    1. Aren’t full in-frame
    2. May be slightly curled and not on a flat surface
    3. Might have torn corners

    While straightening a receipt is always good, it becomes incredibly complicated if we apply the upper three rules, therefore the new approach will be to do multiple attempts at identifying the corners, and only straighten if four are found, otherwise algorithmic errors could warp the receipt incorrectly.

    Once we pre-process the receipt, we will then do a simple text-identification pass to identify what regions of the image we need to run tesseract on.

  • Post 2 – 2 Fast 2 Furious

    Happy Wednesday!

    Today the three of us met and continued working on the project requirements for our Receipt Reader

    The high-level goal will be reading that specific receipt we linked, but as a stretch goal we want to be able to read more receipts of the same format.

    We’re using Google Docs to handle task-tracking & planning. It’s faster to use than using Markdown through Git.

    We got permission to use an OCR library, but to make sure our project isn’t stupidly simple, our current plan is to use image processing to identify, straighten, and pre-process the receipt so it can be more easily parsed by our OCR Library of choice, Tesseract[1]

    [1]

    tesseract-ocr/tesseract. (Dec. 03, 2025). C++. tesseract-ocr. Accessed: Oct. 28, 2025. [Online]. Available: https://github.com/tesseract-ocr/tesseract

  • Post 1 – The Fast and the Furious

    Together with Dáithí O’Flynn, James Lawlor, we have agreed to work on the Receipt Reader.

    Both Dáithí and I are quite involved in societies, and expense tracking has always been quite laborious. I also personally think doing text extraction as a concept is really cool, especially when the use of any machine learning model is not permitted. It’s fun to go back to good ol’ algorithms!

    Our final goal is to be able to take a photo of a receipt and pull out the relevant details.

    Dáithí was quick to the draw and set up our GitHub Org for the project repo!

    I’m a big fan of modules with interesting topics, especially with a module-long capstone, so I’m really looking forward to this!