Posts

Showing posts from October, 2014

Generating a Heat Map Using iBeacons with an Android Application

Image
Introduction About a month ago, I had the opportunity to experiment with iBeacons on the Android platform. My initial task was to implement a proximity trigger for one of our Android apps at work. As we delved deeper into the project, we became curious about obtaining more precise data, such as generating a heat map. Searching for Solutions I began by searching for existing projects and apps that could generate a heat map based on actual distances from iBeacons. Unfortunately, I couldn’t find a precise solution in the Play Store. After visualizing the raw accuracy data on a graph (as shown in the image below), I discovered a helpful page that confirmed some of my findings. Here are my key observations: The raw data from iBeacons is not as accurate as I initially expected. Accuracy varies depending on the orientation of the iBeacon relative to the smartphone. Beyond a certain distance, the margin of error increases significantly. For more precise data, you need to set the transmit inter...

Hint

What Is It? Switching between different programming languages and projects daily can be challenging. To make things easier, I decided to create a quick-access utility for storing and retrieving code snippets, examples, and notes. The new features you learn from various frameworks are often useful later—if not for yourself, then for your coworkers. While Googling is an option, it often takes up valuable time. My solution? A small utility that lets you access your notes in less than 2-3 seconds. Recently, I’ve been working extensively with PostgreSQL, so I decided to build this tool using this reliable open-source database. What Can It Do? This utility allows you to quickly search for syntax examples across multiple programming languages. It’s designed to help you find what you need with minimal effort. How Does It Work? The utility is command-line-based and currently supports space-separated search terms. Here’s how it works: Command Line Interface : You enter your search directly into ...

Automatic Tool for Cropping Bills from Scans

Image
What Is It? At work, we’re developing a project aimed at small and medium-sized businesses that goes beyond simple accounting. It includes many innovative features, but today I want to focus on one in particular: the automatic processing of bills and invoices. Users can take advantage of this feature via a mobile client (Android, iOS) or a web application. The Challenge We encountered an issue where users were scanning multiple bills together in a single image, rather than following the "one image - one document" rule. This made it difficult to process the documents correctly. To address this, I developed a script that automatically detects and crops these multi-bill images into separate, individual images. The Algorithm To separate and crop the bills from a scanned image, I used a series of simple image preprocessing methods: Resize : The image is resized to a standard dimension for consistency. Morphological Operation (IMOPEN) : This step helps in removing noise and refinin...