Questions tagged [image]

This tag is for questions related to the loading, formatting, saving, compression, and display of data representing pictures.

Filter by
Sorted by
Tagged with
7
votes
1answer
2k views

Using homogeneous coordinates to rotate an image

Currently, I have this code snippet, but it's a little bit slow: ...
7
votes
1answer
186 views

Basic OCR using a 1-Layer Neural Network in Haskell

I've used this tutorial in order to learn the basics of creating a neural network from scratch. The program is meant to read handwritten numbers from the MNIST database. The author of the tutorial ...
7
votes
1answer
192 views

Image editing in the frequency space

I wrote a little script that should load a GUI for deciding the bandpass filter. I'm a hobbyist programmer so I look here for comments that will help to improve my code abilities. The applet should ...
7
votes
1answer
339 views

Python Steganographer using PIL

I've made a Python Steganographer using the Python Imaging Library. It basically encodes the binary text in the last 'n' bits of the red content in each pixel of the image. Here is my code, please ...
7
votes
1answer
583 views

Motion detection program for snapping of images

I'm doing a motion detection program where it snaps an image when it detects movement and snaps an image of the person's face if in view while this is all recorded and sends it all to Dropbox. It's ...
7
votes
1answer
9k views

Caching image in memory or on disk

I am caching an image locally..That same image will be used in few screens. Steps for doing this is as follows: Get image from cache If not present in NSCache, get image from Cache directory If not ...
7
votes
2answers
270 views

RGB <-> HSL converter + hue shifting

My input is basically a .png image from the img/ directory (I figured out that I should parse it, because there is an exploit ...
7
votes
2answers
856 views

Image cache for lots of images 2.0

Following from this question I created a Image cache of sorts (let's call it version 1.0) that used WeakReference as "cache" items. And this comes from the ...
7
votes
1answer
2k views

Fastest image upload into SQL database

I am trying to upload an image (screenshot from desktop) to an SQL database as fast as possible. I would like to optimize my current procedure in terms of speed: ...
7
votes
1answer
136 views

Find the center of a red dot of an image in Haskell

I try to find the center of all the red pixels contained in an image using Haskell and repa. My problem is, that the code is ...
7
votes
1answer
638 views

Emojify an image

Last night I was messing with image programming in C# and I tried to make a program that takes an image and transforms it into another image, built with emojis. EmojifyEngine.cs ...
7
votes
1answer
491 views

Doge meme generator in Racket

I wrote a doge meme generator in racket some time ago, mainly as a joke, and I would like some criticism about the general style and what could be improved. Here is how the program output looks : ...
7
votes
0answers
696 views

Read quantization tables from JPEG files

I'm developing an application that will hide information inside the quantization tables of JPEG files. It's called DQTsteg, if you want to know more about what I'm attempting to do. Right now I'm ...
6
votes
4answers
827 views

Checking for minimum image dimensions

This code is part of one of the methods. I'm pretty sure it is really bad programming. The third if statement is supposed to be called if all 4 variables were set. Is another method needed? How would ...
6
votes
2answers
264 views

Checking CSS code for best practices when mimicking

I'm currently looking to try learn CSS properly and I'm looking to recreate the following image using CSS: Now I've managed to recreate the image (sort of) what I am looking to know though is based ...
6
votes
3answers
2k views

Colored image will become black and white

For a project of mine, which is targeting java 6, I had been in the need to have different algorithms/methods to change a BufferdImage with a ...
6
votes
2answers
9k views

Ghost4J PDF to image conversion

The primary goal of this code is to convert a PDF file to images. I also create a directory under C:/Media based on a combination of the PDF name and current date ...
6
votes
1answer
3k views

Program for face recognition

I have been using the following script for face recognition as a security feature: main.py ...
6
votes
2answers
320 views

Image processing algorithm

This is code I need to maintain. I'm trying to make this as an example for code gone bad, for C programmers going to C++. Please provide any comment you can. The original code is about 40 pages ...
6
votes
3answers
128 views

Error handling for function calls to parse a GIF file

I'm debating which version would be more suitable in parameters of code length, readability and maintenance. This is a portion of a set of functions which together parse a Gif file. Version 1: ...
6
votes
1answer
496 views

Image creation for every possible color

I'm trying to create an image with every possible color. It would start with a seed pixel and then place randomly-generated RGB pixels around it. Future placements would be based on whichever open ...
6
votes
1answer
11k views

“Histogram of Oriented Gradients” (HOG) feature detector for computer vision

Here is a function that I've only slightly modified from its original context, found here. Before mentioning anything else, it should be noted that I'm desperately trying to optimize this code for ...
6
votes
2answers
2k views

Java function to rotate an image by 180 degrees

I want to 180 rotate an Image. Here's what I wrote but it seems way too complicated. Is there any way to do this in a simpler way? ...
6
votes
1answer
242 views

Moore-Neighbor Tracing Algorithm

I wrote code to extract the contour of a hole, based mostly on the Moore-Neighbor Tracing algorithm. Only a. instead of finding a shape, I'm finding a "hole"; and, b. I'm looking for the (outer) ...
6
votes
2answers
188 views

Denoise an image under extreme time pressure

I'm working on a real-time, embedded system image processing application for my group engineering capstone in undergrad. I'm receiving data at 60FPS, and have to isolate and detect the location of a ...
6
votes
1answer
5k views

Optimizing bilinear interpolation

I have spent countless hours trying to speed up my bilinear interpolation up. I even tried implementing an SSE version (a double version and a float version), but that was even slower than this ...
6
votes
1answer
793 views

Drawing scanline of an image

This draws scanline of the image to System.Drawing.Graphics. It's quite simple and it's optimized in order to merge neigbour samples with the same color into single ...
6
votes
1answer
179 views

Image processing and plotting

I wrote a program for analyzing pictures. The problem I'm having is very slow processing time for medium images like 800x800. I think the root of the problem for this is the ...
6
votes
1answer
2k views

Getting list of colours from image in lab format

I need to write a bit of code that will get a list of the RGB colours in an image and then translate them into a NumPy array of lab colours. I have managed to do this, but I would like to learn how I ...
6
votes
1answer
3k views

Replace subimage by its average value

I have the input image in, and the mask image lev (which label each pixel as a number from 1 to ...
6
votes
1answer
185 views

Image-downloader/wallpaper setter

I'm making an image-downloading app that sets the image as the device wallpaper. For this I used the class: ImageDownloader.java This class has a function which ...
6
votes
1answer
58 views

Analyzing spoke overlaps during rotation

For a personal project that I've recently started I have to analyze the rotation of two shapes with sets of spokes, where the spokes are evenly-spaced, and split into a given number. That is, if I ...
6
votes
1answer
175 views

Sort all the characters according to their brightness

I wrote a little fractal noise generator the other day, and to test it I wanted to display the dark values with a darker character and the bright values with bright characters (I use a dark background ...
6
votes
2answers
294 views

Haskell program to rename images based on EXIF data

Moved originally from StackOverflow, not knowing the existence of this sister site ... Must say I find programming in Haskell to require much more cognitive intensity than any other language I've ...
6
votes
1answer
429 views

Rotating an Image using own algorithm in python

For an uni assignment I have been giving the task of making my own rotating algorithm in python. This is my code so far. ...
6
votes
3answers
224 views

Class scheduling tool with image output

I have a multilayered dictionary that contains information about classes. I am using this to code an automatic schedule builder that I will eventually add to a separate Tkinter application I made that ...
6
votes
1answer
362 views

Python image art project

This program takes in an image, and saves an "arrowed" version of that image to /tmp/image.png. Example input and output is below the code. ...
6
votes
1answer
9k views

Histogram of a RGB image using OpenCV

I wrote some C++ code using the OpenCV library. The program reads the image and plot histograms of Red, Green, and Blue components. I am very new to OpenCV so I need comments and advice. What do you ...
6
votes
1answer
58 views

Directory of Snapshots

I have snapshots (photos) that I load off my camera's memory card, and store in a folder. Sometimes I have videos, and occasionally plain audio too (the camera can record just sound). Additionally, ...
6
votes
1answer
81 views

Per pixel Image Computation with Gamma Correction in OpenGL and C [closed]

I've been working on a way to optimize pixel computation in OpenGL with C. If this information helps, my current environtment = Linux (terminal) + GPU (Nvidia 1080Ti). I'm working with old OpenGL (...
6
votes
1answer
1k views

Trimming blank space from images

I am working on scanned documents (ID card, Driver licenses, ...). The problem I faced while I apply some preprocessing on them is that the documents occupy just a small area of the image, all the ...
6
votes
1answer
148 views

Python class for organizing images for machine learning

I built a class to help me handle image data to use in machine learning. I thought that there would be a pre-existing package that did what I wanted but I couldn't find it so I wrote this. I am not ...
6
votes
1answer
1k views

Automatic image cropping in Python 3

I made a script to automate the cropping of spectrogram images I generated using Matlab. I have 4 different types of images (Fixed height, but varying width) and they are cropped differently ...
6
votes
1answer
2k views

Image Stenography using LSB technique

The program can be used to hide an image within another image and later extract the hidden image. This is done by concealing the secret image within the lowest bits of the apparent image. Example of a ...
6
votes
1answer
443 views

Segmenting brain images (Dicom format) using region-growing algorithm

I have a list of images in a folder where num denotes the index of image and I used num to run the iterations in a "for loop". ...
6
votes
1answer
247 views

“Heat spot” image generation using bilinear interpolation

This is the code from my answer to a another CR question. My goal was to provide a fast and simple computation and I'm rather unsatisfied with it. It's maybe 10 times faster than the original, but ...
6
votes
1answer
452 views

Fat ViewModels for editing images

How should I deal with ViewModels that are "fat"? Or should I just accept it sometimes. Example - one of my ViewModels (editing ...
6
votes
1answer
532 views

Optimize YUV channel splitting function

The input pointer *data contains the data that needs to be split into different arrays and put in yuvInput. Each pixel is 32 ...
6
votes
1answer
1k views

Bilinear resizing algorithm

I have the next bilinear resizing algorithm, and even though I use fixed point is still quite slow for my requirements. In the past I tried to cache some values in tables but the improvement was of a ...
6
votes
1answer
59 views

Get nearest major city of an image (using EXIF GPS data)

I am writing a program that will take images in a folder, get the GPS Coordinates (from the EXIF data), then return the closest "major city". (I define a major city as one with an airport, so ...