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
216 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
695 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
240 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
68 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
1k 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
7k 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 ...
4
votes
1answer
313 views

A helper class for creating icons from a PNG image and colour in Swift

I have made a helper struct in Swift that creates circular icons from a PNG image (a white icon on transparent background) and a background ...
10
votes
1answer
102 views

Slow image generation

I build a Tower of Hanoi solver which print the solution as an image It works as expected but generating the image is relatively slow compared to the time to calculate the answer. Here is the code: ...
2
votes
1answer
99 views

PHP Template: Image file upload handler

I'm trying to develop some templates for common PHP tasks I've been dealing with. One of which is a general image file upload handler. So far I'm using the following reusable code which seems to be ...
1
vote
1answer
50 views

Сlone image in pure js

I wrote JS to clone image and attached this action to button. It works but I'm not sure that this better way to do it. My questions: is it correct to use querySelector to return elements, or is it ...
10
votes
1answer
921 views

Image template matching algorithm from scratch

I wanted to write a template matching algorithm from scratch. The key area's I'm interesting in are readability, maintainability, DRY, and if the program performance/efficiency could be improved in ...
5
votes
2answers
155 views

Read an image with ADNS2610 optical sensor and Arduino Uno

Preliminaries I have optical sensor ADNS2610 (see datasheet here). There are a few problems which it can be used to solve, but for now let us focus on getting an image from that sensor. This sensor ...
4
votes
2answers
147 views

Detecting a certain amount of violet in an image - follow-up

I'm trying to write a program to detect the colour violet in an image.As discussed in my previous Post @Johnbot suggested that I try using HSL / HSV to determine if the pixel is some shade of violet. ...
8
votes
3answers
1k views

Detecting a certain amount of violet in an image

I need to be able to detect if an image has the colour Violet in it. (Follow-up) The problem that I'm facing is that there are quite a number of shades of violet that it seems almost impossible it ...
4
votes
1answer
73 views

Class made to do some basic RGB analysis

I created this class to load in an image and get some specific values I needed. ...
4
votes
1answer
372 views

Parallelized Sobel algorithm using OpenMP

I implemented the Sobel algorithm sequentially, and got decent performance (1.49 s) but wanted to improve it. I parallelized it with OpenMP and got a ~3x speedup (0.523 s). I'd like to do better, but ...
8
votes
1answer
271 views

Python function to implement an image-processing pipeline

I have written the following function to process images. Now I am not sure if it's pythonic or considered as spaghetti code. I know being flat is better than nested, but I don't see a way around it. ...
3
votes
0answers
90 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 ...
11
votes
2answers
2k views

K-Means image segmentation algorithm

I am a new C++ programmer and I have some experience in Python and C but I was almost completely self taught (I learned C++ with OpenClassrooms). I would like to learn the conventions and how things ...
5
votes
1answer
102 views

Classes to encode and decode images

I'm a developing a image processor, which reads a Base64 (compressed) image and writes its subimage to targets on threads. (Constructors, exception handling, and ...
10
votes
2answers
4k views

Writing a bitmap image from C++

Here's my function that creates a bitmap file from an array of pixels. It can write a bitmap both with transparency and without transparency. Please review my code and give constructive criticism on ...
2
votes
0answers
49 views

Iterate through images really fast with JS

My objective is to modify the JavaScript code to get the single image on the page to iterate through images faster. It should be possible to get the images to load in about 10 seconds(about 3 seconds ...
2
votes
3answers
610 views

Display Thousands/Millions of different background images

Kindly help me check this code, I want to be able to make it load thousands/millions of different pictures as HTML background without crashing or slowing down the browser. The images can be created ...
5
votes
1answer
259 views

Facial recognition tool

I created a small library and an example application in Python for learning about facial recognition and experimenting with it. Right now though, I am loading a list of file names into memory and then ...
5
votes
2answers
203 views

Threshold an image for a given range and Sobel kernel

The class defines functions to threshold an image for a given range and Sobel kernel. Each function has similarities, i.e. they share the same following tasks: each function converts an image to ...
5
votes
2answers
4k views

Median Filter Implementation In Python

I implemented median filter in Python in order to remove the salt & pepper noise from the images. It is working fine and all but I would love to hear your advice or opinions. ...
6
votes
1answer
1k views

Automatic image cropping in Python 3

I made a script to automate the cropping of spectrogram images I generated using Matlab. I have 4 different types of images (Fixed height, but varying width) and they are cropped differently ...
3
votes
1answer
48 views

Checking whether an image is part of another

I have the following code (slightly modified for simplicity). It checks whether a given image A (the template) is part of another image B. To handle different sizes, image B is scaled as long as a ...
0
votes
1answer
49 views

Making an image slideshow

I wrote a function to make a image slideshow in javascript using for() loop, setTimeout() and ...
2
votes
0answers
37 views

Image slider code

I've been doing this image slider section, I've been working on this code for quite a time, the code is perfectly working but I want to improve it. I tried for hours and couldn't find a way. Maybe ...
3
votes
1answer
556 views

Resize and compress images with imagick

I am building a PHP function to manipulate and generate a series of images with Imagick. The aim is to make responsive images with the <picture> element. ...
3
votes
0answers
58 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): ...
7
votes
1answer
136 views

Find the center of a red dot of an image in Haskell

I try to find the center of all the red pixels contained in an image using Haskell and repa. My problem is, that the code is ...
2
votes
0answers
68 views

Javascript drawing image with genetic algorithm

I first posted this question on stackoverflow and have been indicated that cordereview would be a better place for my question. I have had very good suggestions, such as using RMS for the fitness ...
16
votes
2answers
1k views

Python Manga Image Viewer

I'm currently making a manga (read: comic) viewer in Python. This project has been a code-as-you-learn project, because I have been trying to code this as I learned about Tkinter. Python I have known ...
4
votes
1answer
356 views

Image processing performance for flood fill

I'm working on an image processing routines in C# .Net 4.6 or later. The background I have a whole bunch of image processing methods that work on a specialized ...
18
votes
2answers
3k views

Julia Fractal Drawing in C++

I'd like a code review for this program written to draw Julia fractals. I'm specifically looking for feedback on: Style: I haven't written much C++ before, so I'm interested in knowing better or more ...
2
votes
0answers
38 views

Write 16x16 bitmap to frame buffer

The following code writes a 16x16 bitmap to a framebuffer using up to AVX2 instuctions. I'm sure it can be improved with AVX512 ...
2
votes
0answers
59 views

App showing a welcome page with an animal's picture

I have an app which shows a welcome page with an animal's picture. Also, we can navigate to a second view, where there are two canvas, and a collapsable panel which hosts controls' inputs. The aim of ...
6
votes
0answers
75 views

Perl gradient noise generator

I'm working on 2-D top-down graphics engine, and need a way to simulate clouds. My idea was that I could create a layer comprised of a matrix of rectangles whose alpha value would be picked from a ...
11
votes
1answer
236 views

Using Support Vector Machine algorithm to analyze satellite image [closed]

I am using Support Vector Machine (SVM) algorithm to perform a classification. The satellite image I am using is really big (5GB) that's why I am trying to take advantage of ...
3
votes
1answer
268 views

Tilt on hover image

I am asking for a review of this code to see if I am following common best practices or if there is a better way to accomplish the goal set for this code. My purpose was to create an image that would ...
1
vote
1answer
1k views

Read an image file into a canvas and display click coordinates

I am a beginner in JavaScript, which I have started studying since Summer last year. My code's purpose is read a file from file explorer, and put that image in a canvas. Also there is code to allow ...
1
vote
1answer
86 views

Manager for image and JSON assets of a game

I would like to know what you think of this assets manager for a game. If it can be optimized or simplified? It allows you to download sprites, tiles, json files, and other images. ...
1
vote
1answer
417 views

Website with images that pan to different sides

I've just started programming with JavaScript and I am currently working on this hobby website project of mine. The site is supposed to display pages filled with product images than can be "panned" to ...
8
votes
1answer
2k views

Organizing and visually duplicating images

This algorithm is supposed to organize and visually duplicate images. I compare 2 images at a time; 1 is the first index image of the directory and another for comparing every other image in the ...
5
votes
2answers
3k views

Crop multiple images from single image

This code works alright, but it's very difficult to get the dimensions right and takes a bunch of trial and error. I'm wondering how I could improve it. It's meant to cut up board game pieces from a ...
4
votes
4answers
13k views

Get the brightest rectangle within an image

I wrote an extension method for bitmaps which finds the brightest rectangle (with specified width & height) within an image. Hopefully my code comments eliminate any confusion. If not, please let ...
1
vote
1answer
202 views

PHP JPG image re-creation from original file

A third party can upload files via FTP to a client's webserver. These images should be displayed on a public-available webpage. The upload directory is not accessible via normal HTTP. To increase ...
7
votes
1answer
13k views

Thumbnails for bootstrap carousel jQuery plugin

Codepen: http://codepen.io/srkimir/pen/mGbrf Github: https://github.com/srkimir/thumbnails-carousel While you slide left or right appropriately, thumbnails gets selected and change their opacity to ...