Questions tagged [image]

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

78 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
12 votes
0 answers
200 views

Multithreaded Groovy Mandelbrot

Seeing as it's October, I thought I'd do the community challenge. Due to my inexperience coding in Groovy, I decided to give Groovy a go. I'm not sure how well I followed Groovy conventions, and the ...
Justin's user avatar
  • 3,295
6 votes
0 answers
107 views

K nearest neighbours algorithm

Here is a project that I worked on for a few days in June 2020. Since the algorithm is extremely slow, I looked into methods in order to parallelize operations but did not obtain any satisfactory ...
Aaron John Sabu's user avatar
6 votes
0 answers
243 views

Buddhabrot made in CUDA

In the past I have made programs that have generate a buddhabrot with mostly success however all of them were on the CPU and single threaded. As a result they were all slow so I wanted to remake the ...
nullptr's user avatar
  • 669
6 votes
0 answers
51 views

Drawing a line in any direction with pixels

I am doing an image drawing and rendering library, and would like some feedback on this code, it simply draws a line in any direction. The equation for that is: m = (y2 - y1) / (x2 - x1) b = y1 - m ...
Guest's user avatar
  • 61
6 votes
0 answers
458 views

Simple AR Tag classifier

I have been working on creating a simple AR Tag classifier, for detecting a simple AR Tag glyph. Spitting out an image that looks like this: With the red circle indicating the corner closest to the ...
Mark Omo's user avatar
  • 449
6 votes
0 answers
2k views

Iterate through all the photo library in iOS

This function is supposed to return a map of all unique local identifiers of images that are on the iPhone using the IOS Photos Framework. (it is a map so nSnull or (any object can be mapped to it) ...
Noam Segev's user avatar
5 votes
0 answers
1k views

Two dimensional bicubic interpolation implementation in Matlab

I am attempting to implement two dimensional bicubic interpolation algorithm in Matlab. The input is a two dimensional array and the output is the interpolated result. The test input matrix: ...
JimmyHu's user avatar
  • 4,708
5 votes
0 answers
94 views

Interfaces and OOP Design for Image Editor software

I'm new to C++ programming, and I'm building an Image Editor software like Lightroom/CameraRaw from scratch. Apart from procedural code (actually seems that all the functions works correctly) my goal ...
Alessandro Cerro's user avatar
5 votes
0 answers
61 views

Tensorflow loop to analyze gradients derived from MRI and PET images

The code shown below takes the partial derivative of each pixel of the output fused image of a neural network with respect to input image of the neural network using tensorflow's ...
Nishant Kumar's user avatar
5 votes
0 answers
235 views

Drawing the Mandelbrot with multiple threads in rust

The code below draws the mandelbrot set for { z | z∈ ℂ, -2.2 ≤ Re(z) ≤ 0.6, -1.4 ≤ Im(z) ≤ 1.4} into a 300×300px png image. For each pixel, if the sequence {zi} is found to ...
Yosh's user avatar
  • 287
5 votes
0 answers
451 views

Scraper for parsing, downloading, and setting images beside each link in an Excel file

I've written a script in VBA which is able to parse image links from a website, download and store them in a local folder and finally set those images beside each link in an Excel file. As the script ...
SIM's user avatar
  • 2,501
4 votes
0 answers
71 views

Compute the optimized palette for RGB image

...
LdBeth's user avatar
  • 213
4 votes
0 answers
319 views

Possible optimization for finding small bitmap in large bitmap in C# without unsafe code?

Background I am creating a tool to locate a small bitmap in a large bitmap by comparing each pixel. Since I am by far no professional programmer, I was searching for some code snippets and found this. ...
Hanebu's user avatar
  • 41
4 votes
0 answers
2k views

Taking a screenshot of a particular window

I've got a function which takes a screenshot of a particular window. It's important that the screenshot works whether the window is focused/covered by other windows or not, hence why I've used ...
Edge's user avatar
  • 149
4 votes
0 answers
53 views

Better performance in read/write data structure + byte

I am writing a program to compress an image using Huffman encoding and I need to write the data structure and the byte file. After that, I have to read/decode it. I realize that my read and write is ...
fastmen111's user avatar
4 votes
0 answers
3k views

Distance transform on image using NumPy

I would like to find the find the distance transform of a binary image in the fastest way possible without using the scipy function distance_transform_edt(). The ...
user186901's user avatar
4 votes
0 answers
66 views

Functional blob counting

I have image files consisting of black and white pixels encoded as RGB8. I want to count the number of blobs i.e. contiguous areas of white pixels. I rewrote this algorithm in haskell. The algorithm ...
user2740's user avatar
  • 409
4 votes
0 answers
3k views

Capture, display, and save webcam video with openCV using C++

The basics were taken from one of the more basic OpenCV examples. Any comments are welcome regarding style and conventions, etc., as well as tips on using the OpenCV library, which I'm new to. Also, ...
user avatar
4 votes
0 answers
61 views

Basic declarative style to rotate and crop an image array

I wrote a couple of basic Clojure functions (practicing a declarative style) and I was looking to get some feedback on them. You can see all the code here. Is there anything I could improve on to ...
mmbb's user avatar
  • 193
4 votes
0 answers
170 views

Super Resolution in the Wolfram Language, Attempt 2

This is a wolfram language program I wrote for super-resolution, in this case meaning to guess at how to increase the the resolution, and so detail shown in a raster image such as a photograph. It ...
alan2here's user avatar
  • 289
4 votes
0 answers
110 views

Optimizing image generation in Perlin noise generator

I've created a simple Perlin noise generator in JavaScript and am trying to find ways to optimize it. It lives inside a webpage and generates an image using nothing more than random number generator ...
kitfox's user avatar
  • 141
4 votes
0 answers
88 views

Does this go raytracing program follow best practices, and typical project layout?

I'm working through learning Go, so as an exercise, I'm writing a simple raytracer. I'd like general feedback on the code style & architecture. Specific areas of concern: Is the project layout ...
YenTheFirst's user avatar
3 votes
0 answers
54 views

OpenCV for Faster Background Recovery in Watermark Removal

I am working on a watermark removal project using OpenCV in C++. The goal is to recover the background from a composite image by separating it from the foreground (watermark). The code processes the ...
Lucas's user avatar
  • 31
3 votes
0 answers
196 views

Doing image compression with Neural Network AutoEncoders

I wanted to create an image compressor using Machine Learning and started work on an "AutoEncoder". This is a type of Neural Network which takes in the image and creates a compressed vector form. It ...
neel g's user avatar
  • 151
3 votes
0 answers
50 views

React.js component to lazy-load image

I'm trying to design a better solution for img srcset with lazy load. Below is the code from the component responsible for lazy load img, maybe someone has a better way to achieve this effect. Full ...
Jacob's user avatar
  • 31
3 votes
0 answers
547 views

Simple vanilla JavaScript Carousel with tabs and pause button

I currently got into coding and I am completely self taught. Since I know that my code is far from being perfect, I am asking for advice and tips on how to improve. Feel free to drop in any comments ...
cedricjansen's user avatar
3 votes
0 answers
52 views

Caching image thumbnail web-application based on rocket

This is my first rocket web-app. It serves images from a directory and thumbnails from a sub-directory. if no thumbnail is found for an existing image it is created on the fly. Before I launch this ...
ubert's user avatar
  • 31
3 votes
0 answers
2k views

Converts audio files to fixed size chunks and the chunks to spectrogram images

This code takes in input as audio files (.wav or .WAV) and divides them into fixed-size (chunkSize in seconds) samples. Then these chunks are converted to spectrogram images after applying PCEN (Per-...
Abhishek Singh's user avatar
3 votes
0 answers
65 views

Pygame : processing speed independant image loop displayer

I made this in order to teach myself pygame. This displays an images loop at the same speed on any computer (It will lag on a slow computer). Is my time management good or do my datetime call could ...
Heetola's user avatar
  • 131
3 votes
0 answers
1k views

Export EXIF data from thousands of images to CSV

I have written a script that retrieves specific fields of Exif data from thousands of images in a directory (including subdirectories) and saves the info to a csv file: ...
Hjalte's user avatar
  • 131
3 votes
0 answers
340 views

Image Manipulation with PIL/Pillow - Picture effect/filter

I was curious about image manipulation and I was wondering how it was working, so I made some little functions wich are modifying the pictures passed in parameter. The graphics results are not too bad,...
T. Cav's user avatar
  • 31
3 votes
0 answers
1k views

Searching for the location of a sub-image within an image

I have a number of images that were cropped and their backgrounds removed. I've tried to write a function that will search the original unmodified image for the cropped image so that I can restore the ...
asheets's user avatar
  • 171
3 votes
0 answers
93 views

Numpy versus Theano GPU parallelization

I am learning Theano to accelerate my image processing functions. As a start, I am trying to reimplement the function to turn images from colors to black and white (with the same number of channels): ...
hyamanieu's user avatar
  • 131
3 votes
0 answers
383 views

PCA, LDA and Logistic Regression

Based on the great blog by Joel Grus, I implemented LogisticRegression, PCA, and LDA. I'd appreciate feedback as I'm not sure that the logistic classifier is good enough (as it supposed to achieve ...
oba2311's user avatar
  • 197
3 votes
0 answers
69 views

Remove pre-loader animations when all assets on page become available

This code starts when the page loads and when all assets become available, it removes pre-loader animation and page becomes visible. I know some functions has code repetition, but it can await ...
alandreev's user avatar
3 votes
0 answers
50 views

Image placement & animation from grid

I have a grid of different sized images. I made a click event function that grabs the image inside any clicked grid-item. It then saves the coordinates and size of the image and animates from the grid ...
Anth's user avatar
  • 31
3 votes
0 answers
904 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 ...
Sebastian Olsen's user avatar
3 votes
0 answers
46 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: ...
pastuszkam's user avatar
3 votes
0 answers
2k views

Serving images from a Raspberry Pi camera over HTTP

I have a Pi with a camera module that I control with Python. I created a web server with web.py that allows me to make HTTP requests to the PI to retrieve an image. There are two optional parameters ...
I'll add comments tomorrow's user avatar
3 votes
0 answers
443 views

Algorithm for downloading images

I am working on a product application where user could sell/buy. This application is based on collection view. Collection view has collection cell where it displays product image thumbnail. The ...
texas's user avatar
  • 131
3 votes
0 answers
725 views

Grayscale bilinear patch extraction - SSE optimization

My program makes an intensive use of small sub-images extracted using bilinear interpolation from larger grayscale images (some call this problem subpixel translation). I am using the following C++ ...
BConic's user avatar
  • 131
2 votes
0 answers
197 views

Pillow plugin adding support for the QOI image format

Pillow is a popular library for handling images in Python. My code adds support for the QOI image format to Pillow. Aside from loading and saving QOI images, my goal was to write a streaming decoder ...
gazoh's user avatar
  • 3,249
2 votes
0 answers
805 views

Python loading image into memory (numpy arrays) from database bytes field fast

I am looking for feedback on the function below to load a png image stored as bytes from a MongoDB into numpy arrays. ...
Neil's user avatar
  • 161
2 votes
0 answers
61 views

GNUPlot Code for Plotting Three Dimensional Data

I am trying to plot three dimensional (multiple plane) data onto figures with various perspective view. The input data is tab-separated values in multiple file, and each file represent each plane. The ...
JimmyHu's user avatar
  • 4,708
2 votes
0 answers
546 views

Multi-threaded image convolution/pooling-python

This multi-threaded code takes an array of 3d images and applies the convolution function with padding, stride, pad values .. as parameters and same applies for creating pooling layers. I need ...
watch-this's user avatar
2 votes
0 answers
59 views

Generate Black and White confidence map masks for joints, same as OpenPose/Convolutional Pose Machines

Attached below is my code for generating the confidence maps for the joint locations, it is in the same vein as the maps generated for the paper Convolutional Pose Machines and OpenPose. I am ...
ADA's user avatar
  • 121
2 votes
0 answers
50 views

Create mosaic task #2

This post is a continuation of post here: Create mosaic task. I improved code readability, hopefully it'll be reviewable now. Once again, I'm asking for tips to write better code. Task: The point ...
Plajerity's user avatar
2 votes
0 answers
28 views

jQuery code to display images served by PHP, without reloading

My php page displays a slider of images and when the user clicks on an image(.item), the div below (#team_single) changes the content without reloading the page. Content of the div changes also when ...
Vero's user avatar
  • 21
2 votes
0 answers
2k views

JavaFX lazy loading of images in TableView

This code is based off https://stackoverflow.com/questions/25711103/javafx-combobox-lazy-loading-images but modified to work with a TableCell Firstly, the model object should have an observable ...
geometrikal's user avatar
2 votes
0 answers
526 views

LSB Image Steganography

After learning the concept of steganography, I've decided to code an application for it in PHP out of all languages, using the Least Significant Bit technique. A pixel of a colored image generally ...
NeVada's user avatar
  • 71