The Stack Overflow podcast is back! Listen to an interview with our new CEO.

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
3
votes
0answers
40 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 ...
1
vote
0answers
68 views

Expanding the region of interest of an image

I am solving a problem of increasing the ROI of a retinal image using the below algorithm- First, the set of pixels of the exterior border of the ROI is determined, i.e., pixels that are outside ...
2
votes
1answer
109 views

Optimizing custom JPEG decompression

The aim of my code is to decode an image format that is based on the JPEG chain of compression/decompression, however it is not compatible with the default JPEG flow as far as I know, since all ...
2
votes
1answer
67 views

ViewModels for image transformations

In my project I have a chain of Fragments where each one gets a bitmap, manipulates it, then sends it to another fragment for more processing. My fragment chain looks like this: CaptureFragment -> ...
7
votes
1answer
52 views

Loading BitmapImages out of a Zip file

I'm working on a personal project to get better with C#, and as part of that I have a zip file with 20 or so images saved inside. I want to load those images out of the zip file and display them in my ...
3
votes
0answers
41 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 ...
9
votes
1answer
126 views

Maze image solver and animator in Python

This maze solver is a continuation to the maze generator I posted here recently Maze generator & animator in Python This code takes an image containing a 2-color maze as input and solves the maze ...
14
votes
1answer
624 views

Maze generator & animator in Python

This is a follow up to this code and I still did not get the feedback on the drawing functions Maze generator in Python- Gif animator-Custom colors/sizes The code generates custom color and size ...
9
votes
1answer
232 views

Maze generator in Python- Gif animator-Custom colors/sizes

This Python code generates mazes with color and size customization. I intend to add several new maze generating algorithms(Sidewinder, Kruskal, Prim ...) to the Maze class but for now, there is only ...
3
votes
1answer
78 views

Stereo image matching implementation in Halide

The authors of this paper compute support_points of a 900×700 image in 118 ms. I have implemented their algorithm below in Halide. In my algorithm, the nested for loops over length and width iterate ...
1
vote
1answer
32 views

Rails controller method to show an optionally scaled image using MiniMagick

I've got below implementation for my controller and show action which implements MiniMagick gem. I've just wondering is there any better way to write it down? If ...
4
votes
1answer
470 views

Creating an image in Excel using the colors from an input image

I'm having some performance issues in this code and need some suggestions on how to improve it. I'm not interested in "general code style" improvements unless they have performance implications. The ...
1
vote
1answer
71 views

Add watermark to images

Recently, I started reading image processing via opencv library in python. I create a minio object storage and upload some photos into it. After that, I wrote a program which reads every image in ...
1
vote
1answer
305 views

Storing Data In a Image pixels

I wrote a tool to store text as colors in a image around the border. I then saved the resulting image to file. To use the resulting file I set it's path to a the src attribute of a tag and call ...
1
vote
0answers
35 views

Photo rename by Exif date and group into folders with a threshold

I wrote this tiny F# project yesterday, but I am a bit rusty and I would like to know if there is anything I can refactor and make more elegant. ...
4
votes
1answer
52 views

Command line utility to convert image formats of photos

Below is some code for a basic command line utility to convert image formats of photos. I'm wondering how any part of it might be written with better style, i.e. how it could be neater, clearer and ...
6
votes
1answer
149 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 ...
3
votes
1answer
74 views

Apply a sepia filter to an image

I'm writing a simple function that applies a Sepia filter to an image. My function works, but I'm a beginner gopher. So I would like to know if there is a way to improve the code. I usually code in ...
16
votes
3answers
8k views

Change desktop background

I've created a simple program that downloads an image (different image every day), then sets it as my desktop background. It is a console application, and closes immediately after downloading the ...
5
votes
1answer
70 views

Rust code of a tree fractal

I just picked up Rust recently and this is my first program (longer than 10 lines at least) so I'm looking for constructs that are more native and natural to Rust. I come from a c++/ python background....
16
votes
4answers
10k views

Processing an image to extract green-screen mask

I am using OpenCV to process an image, and in my code, I have to check / edit each pixel separately: ...
8
votes
1answer
155 views

Bilinear image interpolation

I have written a bilinear interpolant, which is working moderately well except that is painfuly slow. How can rewrite the code to make it faster? Using opencv directly isn't a valid answer. ...
2
votes
1answer
93 views

Image Processing - Comparing 2 images and Ranking Similarity

My code compares 2 images of any shape/dimension and ranks them in order of similarity. It starts with reading from a CSV file with columns image1, image2 which contain absolute paths and then ...
5
votes
3answers
624 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? ...
0
votes
1answer
32 views

Upload image with GD library

First of all I just started learning OOP. My priority is to make safe code. I think my code is safe, because I use GD to make a copy of the uploaded image and I use an image proxy to make sure nobody ...
5
votes
0answers
39 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 ...
6
votes
0answers
29 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 ...
3
votes
1answer
173 views

Design pattern: image downloads

This is an image representation of my code below: This is what they do: CellWithImageX: Subclasses of UITableViewCell. They have an image and an loading indicator....
4
votes
2answers
100 views

Edge detection in a canvas

I have one function in my code to detect edges in a canvas but it's the slowest part of my code and is used everywhere. If I could just optimise this, my whole program would speed up considerably. ...
4
votes
1answer
68 views

Getting hex colours from a image

I am trying to get the hex colours from an image. The problem I am having is that for some reason randomly the code causes high CPU usage, which times out the browser and I am not sure how to optimise ...
3
votes
1answer
648 views

jQuery image carousel

I have made this custom image carousel, using HTML5, jQuery and CSS. My aim was to make it really lightweight but with (just) enough features: "bullets", auto-advance, responsiveness. ...
2
votes
0answers
20 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 ...
5
votes
0answers
48 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 ...
3
votes
0answers
114 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-...
5
votes
1answer
116 views

Create mosaic task

I tried to apply for software engineer - intern with this task, and there is no reply since I sent it, so I guess I failed. Can you give me a direction in what way I should improve my code? Task: The ...
11
votes
1answer
58 views

Visualization of the Pythagorean theorem

Background The Pythagorean theorem asserts that for a right triangle with hypotenuse \$c\$ and other sides \$a\$ and \$b\$, the area of the square placed upon \$c\$ is equal to the sum of the areas ...
7
votes
1answer
41 views

Bash script to encode images in base64 and generate a CSS file from them

These are the first lines of code I've ever written. I've been interested in the idea of learning to program for quite a while, but never really pulled the trigger, and now I've been playing around ...
2
votes
0answers
23 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 ...
6
votes
1answer
62 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 ...
1
vote
0answers
56 views

Proper image sizes in WordPress

I wanted to create a set of functions that would allow me to easily implement images for multiple screen resolutions in my custom page templates. WordPress offers some functionality for implementing ...
1
vote
0answers
72 views

Python3 - Cropping PDF files according to coordinates

I have a python script, that is performing OCR on PDF pages. I am trying to do so I can provide coordinates to the script - so it will only select the text within the provided coordinates ...
1
vote
0answers
135 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 ...
4
votes
1answer
62 views

U-Net: A TensorFlow model

What I want to know I am writing a ML model called U-Net with Python (and TensorFlow). My question is not about the machine learning or Tensorflow, I want to know the best structure of the code. I ...
5
votes
1answer
3k views

Converting a vector image to matrix

I am playing with the cifar-10 dataset (available here) and for now I would like to plot one of the images of a batch. The images are represented as vectors when I get them from pickle: From the ...
3
votes
0answers
55 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 ...
5
votes
1answer
95 views

Find png files in folder structure and map them to Photoshop groups and layers

I've created a heavily problematic code that works. Summary: It looks through a folder structure, for png files and tries to replicate this structure in Photoshop. Files are mapped layers and Folders ...
4
votes
2answers
95 views

Binary genetic programming image classifier's fitness function

I am trying to figure out how to improve my binary image genetic programming classifier's fitness. It takes images and classifies them if it has some feature X or not in it. These are the main ...
4
votes
1answer
1k views

NSURLSession load images on demand

I'm trying to come up with a system to populate my item images on demand, this is what I have so far. One obvious bug is that an item image could be downloaded multiple time since the ...
5
votes
1answer
62 views

Extracting watermark from a video using Python

I'm extracting a few frames from a video: Comparing the similarity or equality of pixel color (from first two images) Saving to a new image Comparing the new image (conjunction of first two images) ...
6
votes
1answer
82 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 (...