Questions tagged [image]

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

4
votes
1answer
66 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
531 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. ...
1
vote
0answers
11 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
36 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 ...
1
vote
1answer
87 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 ...
3
votes
0answers
90 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
111 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
55 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
36 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
19 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
52 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
36 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
15 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
23 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
52 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
1answer
447 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 ...
3
votes
0answers
30 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
91 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
90 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
77 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 (...
7
votes
1answer
543 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 ...
12
votes
1answer
192 views

Replace color in image measured by Euclidean distance

This script replaces the red hair in image to black color (replace one color to another) Three major parts in this script Not just replace color red to black, I hope the output image looks natural, ...
4
votes
1answer
5k views

Send blob image using Ajax/PHP

I have an image cropper that crops the uploaded image, Before sending it to the server using PHP and AJAX. Here is a live fiddle to preview a working cropping example. Here is the code: ...
34
votes
7answers
4k views

Increase performance creating Mandelbrot set in python

I created a program in python that generates an image of the mandelbrot set. The only problem I have is that the program is quite slow, it takes about a quarter of an hour to generate the following ...
13
votes
2answers
11k views

Read and write BMP file in C

I'm teaching myself a little C, and I've found this website. It has an exercise about manipulating a BMP file in C. I would like to know if I can make my code look more "idiomatic" or professional, ...
4
votes
2answers
108 views

C++ Pixel/Array manipulation libs

I was tired to always perform pixel manipulation one by one, so I started to create my own templated header to perform computation over pixel (RGB, or RGBA), but I also make it for ND for some cases. ...
6
votes
2answers
293 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 ...
3
votes
2answers
97 views

WPF Bitmap / BitmapFrame to multi-page / multi-frame TIFF with JPEG encoding

I was searching for a long time how to write multi-page TIFFs with the JPEG encoding. TIFFs support JPEG encoded frames but the built-in encoder in .NET Framework does not have JPEG as a compression ...
1
vote
0answers
32 views

How to speed up the retrieval of the corners of a mask

I have trained a polygon detector neural network to recognize the mask of "quadrilateral" (the mask generates curvy lines so it's not exactly a quadrilateral). I would like to get the corners of the ...
2
votes
1answer
108 views

Making a catalog of pictures

Is there a way to make this code run faster? I have over 6000 pictures in .jpg optimized to a maximum of 40 kB. It starts quickly but after like 2000 pictures it runs way slower. The final .xlsm file ...
1
vote
1answer
38 views

Bash function to produce variants of images at 2X and 3X resolutions

I use ImageMagick to crop image, encapsulate the related code to functions. Here is the code: ...
4
votes
1answer
56 views

Analyzing spoke overlaps during rotation: Round 2

Round 1: Analyzing spoke overlaps during rotation I previously posted this question, but I've changed a lot of the code since then. There was a mention of the previous being a bit mixed up, and ...
2
votes
1answer
164 views

Inverse mapping with bilinear interpolation on an image

The following is my solution for an inverse mapping with bilinear interpolation on an image. The original image is img and ...
3
votes
3answers
144 views

Image filter for gradient detection

This filter is basically gradient detection (the variable gradImg) like an edge detection (Sobel or Prewitt filters) and also the direction of that gradient whether ...
2
votes
1answer
43 views

GIF/PPM to greyscale converter

This is my take on an image → greyscale converter. ...
3
votes
0answers
63 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: ...
6
votes
1answer
56 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
431 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 ...
3
votes
1answer
197 views

Image pre-processing and segmentation

I'm new learning python and image processing with python. For this reason, I took a project called "Classification of breast cancer images with deep learning". I applied the following techniques: 1)...
2
votes
0answers
82 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 ...
4
votes
2answers
137 views

Portrait Painting Genetic Algorithm

Inspired by this article. I've been trying to learn more C# and OOP. Here is my take on a genetic algorithm as described in the article. Here are some of the results flower jelly lighthouse beach ...
2
votes
0answers
45 views

Extracting face features from selfies faster

My code takes two .jpg files (two selfies) and extracts a vector of 128 features from each selfie. After this extraction we take these two vectors and get their cosine distance. I timed the script ...
2
votes
0answers
152 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....
3
votes
1answer
68 views

Building a timelapse with ffmpy

As a 'trying to learn Python' project, I am using ffmpy to stitch together a timelapse from a series of still images. I'd like the script to output a couple of formats for web use. This is what I ...
3
votes
1answer
349 views

Upload a user's avatar

Could you guys tell me if my code is safe? And i want to know how to improve it. You will see a detailed explanation about the code on the comment blocks inside the code. profileIMGform.php <...
3
votes
1answer
1k views

Resize Images Dynamically

I set out to make a simple dynamic resize method for images. Obviously, it's better to serve images that are pre-sized to avoid unnecessary server loads. But it was fun to make for a novice/beginner ...
2
votes
1answer
78 views

Image pixel-editing class with an enum for colors

I'm creating an image class that can be used by other classes to create visualizations of data. The class doesn't need to be complicated as the classes will be editing the images pixel by pixel. The ...