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
2
votes
1answer
111 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
41 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
58 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 things ...
2
votes
1answer
901 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
275 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
117 views

GIF/PPM to greyscale converter

This is my take on an image → greyscale converter. ...
3
votes
0answers
244 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
59 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 ...
3
votes
1answer
789 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
219 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 ...
5
votes
2answers
210 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
118 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
372 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 <...
4
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
84 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 ...
2
votes
1answer
790 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 <...
3
votes
0answers
1k 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 ...
6
votes
1answer
1k 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. ...
2
votes
2answers
1k views

Image similarity measure

I'm attempting to speed up my genetic algorithm that modifies images. After searching, I've found that my fitness function is the bottleneck, taking sometimes up to ...
2
votes
0answers
56 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 ...
5
votes
2answers
1k 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 ...
22
votes
6answers
58k views

Determining if 2 images are the same

This is my program code for comparing if 2 images are the same. It basically uses the open dialog and opens 1 image at a time and puts it in 1 picture box. I heard that ...
3
votes
3answers
73 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
55 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). ...
13
votes
6answers
5k views

Getting the dominant RGB color of a bitmap

I'm currently running this function 60 times per second in order to get the dominant color on my screen in RGB values. It is using approximately 15% of my CPU on 30FPS and 25% of my CPU on 60FPS. Is ...
2
votes
2answers
37 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 ...
3
votes
1answer
304 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 ...
7
votes
2answers
304 views

RGB <-> HSL converter + hue shifting

My input is basically a .png image from the img/ directory (I figured out that I should parse it, because there is an exploit ...
3
votes
1answer
78 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 ...
3
votes
0answers
141 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,...
4
votes
0answers
46 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
82 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
1k 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
0answers
726 views

Texture Loading in LWJGL 3 - follow-up

Here's my optimized Texture class: ...
11
votes
4answers
10k 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 ...
2
votes
1answer
196 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
946 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 ...
3
votes
1answer
145 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
136 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 ...
7
votes
2answers
410 views

Diagonal gradient optimization

With the SDL library, I'm creating an SDL_Surface* at w and h dimensions. ...
3
votes
1answer
171 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 ...
3
votes
1answer
39 views

Tone Mapping image manipulation

This code is extremely slow and ideally I would appreciate someone walking me through getting this going on the GPU, but if nobody has time for that which is understandable, any and all optimisations ...
5
votes
3answers
9k views

Drawing a bufferedimage into another

For what I'm doing, I need to be able to draw a buffered image directly into a larger buffered image. I've searched around a little and still have failed to find a better way, but my current way is ...
2
votes
3answers
81 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
466 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 ...
7
votes
0answers
885 views

Read quantization tables from JPEG files

I'm developing an application that will hide information inside the quantization tables of JPEG files. It's called DQTsteg, if you want to know more about what I'm attempting to do. Right now I'm ...
6
votes
1answer
399 views

Moore-Neighbor Tracing Algorithm

I wrote code to extract the contour of a hole, based mostly on the Moore-Neighbor Tracing algorithm. Only a. instead of finding a shape, I'm finding a "hole"; and, b. I'm looking for the (outer) ...
4
votes
0answers
89 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 ...
2
votes
0answers
2k views

PyQt5 - Open new image window for each button click in menu

I wanted to write a code that each time I will press some button in my menu, a numpy image array will somehow be created, and this image will show up in a new window. So the following code is the ...
3
votes
2answers
8k views

Dynamically creating elements with an object constructor

Just experimenting with various Javascript techniques and was wondering if the code below is valid and if there are any disadvantages to using this technique to create html tags from JS object ...

1 2
3
4 5
13