Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [image]

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

3
votes
2answers
59 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 ...
5
votes
1answer
59 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
73 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 (...
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 ...
3
votes
2answers
83 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 ...
4
votes
2answers
101 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. ...
1
vote
1answer
37 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: ...
2
votes
1answer
78 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 ...
2
votes
1answer
36 views

GIF/PPM to greyscale converter

This is my take on an image → greyscale converter. ...
3
votes
3answers
132 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 ...
3
votes
0answers
37 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: ...
4
votes
1answer
55 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 ...
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 ...
2
votes
0answers
62 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 ...
6
votes
1answer
166 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 ...
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 ...
2
votes
0answers
41 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 ...
3
votes
1answer
140 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)...
4
votes
2answers
127 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 ...
3
votes
1answer
52 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 ...
2
votes
0answers
147 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
325 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 <...
0
votes
1answer
60 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
76 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 ...
3
votes
0answers
401 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 ...
2
votes
1answer
124 views

Merge two UIImages into one

I have merge two images into one. I already implemented it with some help from the internet but it takes around 2,5s. I'm testing on the simulator so let's take it as a reference. I currently use <...
2
votes
0answers
28 views

Calculate average round cell value from each 2D array cell

I am try to practice the leetcode and hit the following question 'image smooth'. Basically the question is to calculate average the around cell value from a 2D array. I have following code. But if ...
6
votes
1answer
184 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. ...
4
votes
2answers
300 views

Passing bitmap from C# to C++ via a struct

First, I've read the a few questions regarding this issue, the most helpful being: https://stackoverflow.com/questions/27463876/passing-bitmap-from-c-sharp-to-c I was unable to get the provided ...
3
votes
3answers
68 views

Change all pixels that lie in a given color range to a new color [closed]

This is what I have so far but it's not perfect... Any input would be very helpful! ...
1
vote
0answers
51 views

Android app to take a photos and show them in a gallery

Gallery will be displayed in RecyclerView. User can select some images and delete it with one button. It all works, but i think I have bad code, because I don't use some instruments (like fragment). ...
2
votes
2answers
34 views

Split all images over x amount of pages with $_GET

I would like to receive some feedback on the code I am currently using to display x amount of images on my website per ...
12
votes
1answer
181 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, ...
3
votes
1answer
275 views

Uploading and showing images securely

I've read various posts about how letting users to upload files can create vulnerabilities to your website such as a user injecting PHP code in an image. So I've created a small test project where ...
3
votes
0answers
51 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,...
3
votes
1answer
56 views

YUV422 to RGB24 using Intel Performance Primitives

I have a C++ method that uses the Intel performance primitives library to convert an image from YUV422 format into RGB 24. I am PInvoking this method from C# (WPF) where the YUV images are coming from ...
4
votes
0answers
44 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 ...
4
votes
1answer
49 views

Shell function to convert .png to .svg file

I needed to convert some custom icons that were in .png format to .svg format and did not want to use an online converter for it. I could not find an out-of-the-box solution online so I created my ...
2
votes
0answers
452 views

Gray-level co-occurrence matrix feature computation

I have many images and want to compute the GLCM properties for every image. Below my code that runs many hours to complete the task: ...
1
vote
1answer
84 views

Laravel image upload

I'm new to the filesystem from Laravel, but I need an upload script that allows users to upload images to my server. However, i'm concerned about securety, so I thought why not ask for advice, because ...
7
votes
4answers
676 views

Caching Color-Bitmaps as MemoryStreams

I am in the need to cache Bitmap's in a memory-optimized way because the API I am building will need to process many colored ...
11
votes
4answers
5k views

Python 3 function to rotate an image 90°

A coding challenge that rotates an image 90 degrees counterclockwise. The image is represented as an array matrix. I believe the time complexity is O(n2), but I'd like to know for sure, as well as any ...
3
votes
1answer
85 views

Centered finite difference approximation for edge enhancement

I implemented a centered finite difference approximation for edge enhancement in images. The difference approximation has a step size h of the partial derivatives in the x- and y-directions of a 2D-...
2
votes
2answers
131 views

Finding a word that represents an image

This is an app wherein you have to find the word that represents the image. It's the same concept as the course app but I did this one myself. How can I improve this code (put more commentary, put ...
4
votes
1answer
4k 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: ...
3
votes
1answer
465 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. ...
3
votes
1answer
120 views

Flood Fill using unordered_map which has user-defined type as key

I have an implementation of the flood fill algorithm. Assume that an image is provided as a vector of ...
2
votes
3answers
73 views

Converting colours in an image using Python Imaging Library

I have written the beginning of a map engine which runs off PIL and some JavaScript client side. Ignoring the rest of the code that is in the same file as this function, can you suggest any ...
2
votes
1answer
156 views

Image processing using Python OOP library

I am trying to learn OOP by refactoring my existing code (functions only). This example works but I am not sure whether it is pythonic and good practice. I have a shared library which consist of ...