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

learn more… | top users | synonyms

5
votes
0answers
44 views

Decoding grayscale PNG and performing Prewitt operator for edge detection

I'm a hobbyist programmer. What I try to do here is to read 8-bit grayscale PNG file. Then unfilter it. (That caused a headache). And after that perform Prewitt operator for "edge detection". I know ...
2
votes
0answers
39 views

Computing the weighted centroid dependent on previous row/column

I am working on a project for a Raspberry Pi that requires some image processing. The aim is to find a white line on a black background by finding the weighted mean in each row/column. However to ...
-3
votes
0answers
15 views

Image resize does not work [closed]

This is my code for rename and upload image to dir folder image It's work good ...
4
votes
3answers
62 views

PPM File Modifier

I've been working in C++ for the better part of this year and am looking to improve my style and efficiency as much as possible. One thing I've been told is to work on commenting code to make it ...
8
votes
2answers
106 views

Color substitution in a BufferedImage

The setPixelColor function below changes the color of pixels. I need some suggestions to optimize this function. Example: ...
3
votes
1answer
78 views

Image processing: rotation

I've made two functions for image processing: First one is for rotating an image Second one is to set all pixels of one color to another color Rotate Image: ...
12
votes
1answer
141 views

How many days to Go?

Here's my first serious attempt at writing Go code. This program counts the number of days until a certain date and displays that in the system tray. To do that, it first reads the target date from ...
8
votes
2answers
105 views

Graphical editor programming challenge

I have posted here my working and accepted solution to the graphical editor programming challenge (detailed here) for your review. The program recognizes the following image editing commands: ...
4
votes
2answers
68 views

Vectorizing a pixel-averaging operation in Numpy

I am reading from a file containing some segments (irregular parcels of the image) and trying to average the entire segment to have one pixel value. This is the code I use: ...
3
votes
1answer
63 views

Sum of Absolute Differences algorithm implementation

Those unfamiliar with that algorithm can have a deeper look here, in a few words, there are two arrays where you subtract each element ar1[0][0]-ar2[0][0] and add ...
0
votes
1answer
37 views

“Images” exercise from A Tour of Go

The "Images" exercise in A Tour of Go asks for an implementation of image.Image. I wrote two solutions, one easy and one harder (just for practice in dealing with ...
4
votes
2answers
210 views

Image Cropping and Resizing

I am building a Go based image processing worker for my web application. I am trying to be idiomatic, but I am new to Go. Any feedback, is appreciated. This program uses bimg to generate 4 square ...
2
votes
0answers
90 views

React Image component that loads and blurs an image onto a canvas

My react.js Image component will load an image from a URL or base64 string, do some processing on it and put it on a canvas. The "preload" prop is a 10x10 pixel image that is blurred just a little bit ...
3
votes
1answer
66 views

“Rasterbation” function to split an image into a grid

I want to create a function that splits an image into many separate blocks that when put together look like the image as a whole, often called a Rasterbator. Given the number of tiles for height and ...
2
votes
0answers
75 views

Find differences in screen bitmap [closed]

I'm working on a little screen sharing project, it has various screen codecs and I thought implementing another efficient codec by myself. The main idea is comparing previous against current desktop ...
1
vote
0answers
16 views

SVG filtering an image to stepped alpha grayscale

I have a variety of images that will be used in a style intended to mimic a dot-matrix LCD (is that even the right term? I feel old and I'm only 24...) In a previous version, I rendered these images ...
4
votes
1answer
65 views

Wavelet decomposition of images

I am working on wavelet decomposition and found a formula for it and wrote it by myself for computation. The formula is: $$I_{LH}(i,j) = \sum_{p=1}^{N_L} \sum_{q=1}^{N_H}\ L(p)\ H(q)\ I(i+p, j+q)$$ ...
7
votes
1answer
81 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 ...
6
votes
1answer
2k views

Program for face recognition

I have been using the following script for face recognition as a security feature: main.py ...
4
votes
1answer
83 views

Reading a .raw file while looking for .jpeg signatures

The code reads 512 bytes at a time and stores them in a buffer. When the code sees a .jpeg signature it will proceed by writing to a .jpeg file until another signature is found, thereafter the process ...
2
votes
1answer
98 views

Image processing for black level and lens shading correction

I don't have a lot of experience in C++; I'm more of a C# guy. I'm trying to convert some Matlab image processing code to C++. I would appreciate any feedback about C++ coding conventions, which data ...
3
votes
1answer
216 views

Convert an image to 8-bit color

I have a function that will take an image and then return that image in 8-bit color. Almost all of the code was taken from MSDN. The code is quite short compared to all of the other methods I've seen ...
2
votes
1answer
122 views

Pixelate image with average cell color

I wrote a function that will pixelate an image using the average color of each 4x4 cell. The function will "split" the image into 4x4 cells, and find the average color of each pixel in the 4x4 cell, ...
5
votes
2answers
77 views

Swapping dynamically populated images on hover/touch

I'm using jQuery to swap images on hover. There's a main image, and a gallery of thumbs. When the thumb is hovered over/touched, the larger version of it populates the main image, and the smaller ...
8
votes
0answers
129 views

Fast bicubic upscaling in C# for image scaling

I've been trying to write an image scaler in C# with a focus on improved performance over the GDI+ scaler. My current bicubic implementation when running with a single thread is slightly slower than ...
4
votes
1answer
44 views

Data conversion routines for FFT

I have written the following routines to work with digital images in various representations. Can I optimize them for better accuracy and performance? ...
3
votes
1answer
65 views

FFT Convolution

I have written the following routines to convolve two images in the frequency domain which are represented as 2d Complex arrays. How can I optimize my routines for better performance? ...
1
vote
1answer
37 views

Padding an image for convolution (image processing)

I have written the following routines. Do you know of any better algorithm? Is there any faster way to pad an image for image processing? How can I optimize them for better performance? ...
4
votes
1answer
50 views

Rusted Mandelbrot

As my go to first project for a language is a Mandelbrot, I had to implement one in Rust. I'm particularly annoyed by invalid_arg_count, as I feel like there has to ...
1
vote
1answer
56 views

Video Feed via TCP Socket

I managed to send video feed over tcp socket using code and decode of string64. My problem is that the video feed is kinda laggy, and it's probably because of this time between coding and decoding. ...
4
votes
1answer
72 views

Pathfinder from image file

I've created a simple pathfinder programme that receives its input from a very small .png file. Example file here: Here's a link to the file (note that the green pixel represents the start, the red ...
0
votes
0answers
77 views

Sending an image from a server to a client over a TCP socket

I only have one video stream of 30 FPS to send over a TCP socket and it's sending a lot of data through my router. Everything just lags I can't even display the image. Is there a way to improve my ...
1
vote
1answer
111 views

Image resize optimization

This Delphi (Seattle 10) routine resizes a JPG image if one of its sizes is larger than AMaxDimension pixels, and gives it a compression factor of ...
2
votes
1answer
27 views

Image-processing filters using decorator pattern in Java

This is a follow-up question of this other one, where I was trying to use the Decorator Pattern in a Python example. I figured, that Java might be a better language for this exercise, so I ported my ...
6
votes
2answers
136 views

Accepting user defined functions for custom map reduce functionality in C++

I am implementing map and reduce - style functions for processing geospatial raster datasets. I would like the ...
0
votes
1answer
46 views

Image-processing filters using decorator pattern in Python 3

The goal of the following short Python 3 program is to improve my understanding of the decorator design pattern. Therefore, I would be mostly interested about feedback on this aspect, i.e. whether ...
3
votes
2answers
335 views

JS cross-fade transition

As the question says....Can this be done any better? I could introduce more variables to cut down on function number, but does it make sense? So this is a simple cross-fade between two images : ...
8
votes
1answer
46 views

Barcode (Code 128)

I wrote the code below to generate Code 128 barcodes, based on the specs. ...
4
votes
2answers
99 views

Search rectangle on bitmap

I have code that loading bitmap from file. And searching for black rectangle(5*5). Can you help me to review it? ...
7
votes
1answer
274 views

Update bitmap in picturebox with data from a socket

I'm working on a screen sharing project, and I receive a small block of images from a Socket constantly. I need to update them on a certain initial desktop bitmap I ...
4
votes
1answer
357 views

SVG photo mosaic creator

I got this as part of some interview assignment. After some head scratching I think I have done quite well as the result can be seen here: After transformation(10x10 tile): More crisp picture with ...
5
votes
1answer
85 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 ...
4
votes
1answer
125 views

Reading and displaying an image from a folder

I have a question concerning the correctness of the reading and displaying the image in ASP.NET Core MVC web application. This is the way I am reading image names from a specific folder (I am using <...
3
votes
1answer
119 views

PHP Image size recalculation function

I got a function to recalculate the image size based on two settings. Force ratio, force the requested ratio, default the original ratio will be used. Keepsmaller, the uploaded image may never become ...
3
votes
1answer
57 views

Writing a byte array image to disk with an automatically generated filename

I have the following code that that writes large images to disk. My application server is running out of memory and I'm wondering if I could somehow optimize the following: ...
8
votes
2answers
212 views

Reading binary files in XTF format

I have a few thousand binary files that have corresponding structs in them, followed by any number of bytes (this exact number of bytes is given in one of the fields in the structs). I read in data ...
2
votes
2answers
70 views

Writing values from JSON on image and display image

This is a script I made that opens img.png, downloads the JSON data from the API, writes it on image and displays it. It currently is a community ad over Arqade. ...
3
votes
0answers
38 views

Simple gallery with scroll

I just created a simple gallery with scroll. Everything works fine but I'm not sure how should I optimize this code: ...
2
votes
0answers
51 views

MPI BMP image comparison

I made a simple program in which I compare two images pixel by pixel and determine if the pictures are the same. I'm trying to adapt it to MPI, but I'm afraid that the communications are taking too ...
4
votes
2answers
185 views

Importing JPG, JPEG, and PNG images from a folder to an Excel worksheet

As I am a novice, I was keen to solve the task, so now I want to optimize the code. ...