Posts

Creating a Drill-Printing Robot with Android and leJOS

Image
Project Overview This project is an exciting fusion of Android development and robotics, combining an Android application with the LEGO NXT cube (v1.0) enhanced by the leJOS firmware. The result? A robot capable of drilling images, among other things! The project consists of two main components: Android Application : This app communicates with the NXT cube via Bluetooth, acting as a controller for various robotic functions. NXT Robot with leJOS Firmware : The NXT cube is upgraded with leJOS, allowing programming in Java, making it more versatile for complex tasks. Android Application The Android app isn't just for drilling images—it's a comprehensive controller for the NXT robot. Initially, it was designed as a multi-functional tool capable of: Controlling the robot’s movement using different programs, like line-following or accelerometer-based controls. Allowing the user to select the type of robot and the corresponding control programs. After pairing the app with the NXT cube...

Automatically Rotating Scanned Text Images with Tesseract OCR

Problem If you've ever had a batch of scanned images with text, you know how tedious it can be to manually rotate each one to the correct orientation. This process can be especially frustrating when dealing with a large number of images. Wouldn't it be great if there were a way to automatically rotate these images so that the text is always upright and readable? Solution To solve this problem, I developed a simple script that automatically detects the correct orientation of text in scanned images using Optical Character Recognition (OCR) and dictionary matching. Here's how it works: OCR Parsing with Tesseract : I used Tesseract, a popular open-source OCR engine, to extract text from the images. Tesseract is powerful and versatile, making it an excellent choice for this task. Dictionary Matching : I created a list of the most commonly occurring words in the text. This list acts as a reference to determine the correct orientation. While my example includes only 5-6 words,...