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
6
votes
1answer
256 views

“Heat spot” image generation using bilinear interpolation

This is the code from my answer to a another CR question. My goal was to provide a fast and simple computation and I'm rather unsatisfied with it. It's maybe 10 times faster than the original, but ...
6
votes
1answer
454 views

Fat ViewModels for editing images

How should I deal with ViewModels that are "fat"? Or should I just accept it sometimes. Example - one of my ViewModels (editing ...
6
votes
1answer
534 views

Optimize YUV channel splitting function

The input pointer *data contains the data that needs to be split into different arrays and put in yuvInput. Each pixel is 32 ...
6
votes
1answer
1k views

Bilinear resizing algorithm

I have the next bilinear resizing algorithm, and even though I use fixed point is still quite slow for my requirements. In the past I tried to cache some values in tables but the improvement was of a ...
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 ...
6
votes
1answer
766 views

Pin an array in memory and construct a Bitmap using that buffer

I'm using some resources in the code below to pin an array in memory and construct a Bitmap using that buffer. I'm not sure if I'm handling all of the resourced in ...
6
votes
1answer
233 views

Eraser tool for GIF editor

I am making a GIF editor in C#, and I am currently working on the eraser tool. I am not sure what I can do to make it more efficient, because when I make the thickness (diameter) more than 30 (pixels) ...
6
votes
1answer
242 views

Rotating background using Swing: performance issues

In a jPanel, I'm displaying a 1203x1203 background that I rotate every 30ms. Problem is, Swing is known to be a slow library, and I assume rotating a huge picture at a quick rate would be quite ...
6
votes
1answer
1k views

Optimized thumbnail generation

Here is a snippet of code that generates a thumbnail from a given file. It works well, but is much slower than desired. Without using an external library (which I'm trying to avoid for learning ...
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 ...
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 ...
6
votes
0answers
288 views

Simple AR Tag classifier

I have been working on creating a simple AR Tag classifier, for detecting a simple AR Tag glyph. Spitting out an image that looks like this: With the red circle indicating the corner closest to the ...
6
votes
0answers
2k views

Iterate through all the photo library in iOS

This function is supposed to return a map of all unique local identifiers of images that are on the iPhone using the IOS Photos Framework. (it is a map so nSnull or (any object can be mapped to it) ...
5
votes
3answers
205 views

Improve this image file browser (remove redundancy)?

Let me start by saying that the code works as is but I think it has a lot of redundancy. It is written this way as I kept getting nullpointerexceptions if I try to put the fileCounter > gameDiff if/...
5
votes
2answers
1k views

Classifying image by file extension within a PDF creator

To create a pdfDocument I am using following code which works as expected but do not want to use multiple if else. Any patterns or any design strategies? It may ...
5
votes
4answers
267 views

Engineering a minimalist image interface without templates

I'm practicing different ways of class design, so I'd like feedback on the design characteristics. Of course code practice comments are also welcome. It was a conscious decision to omit templates. My ...
5
votes
3answers
253 views

Avoid static initializer for lists of image and video formats?

I wrote the following code to read constants from annotations: ...
5
votes
2answers
830 views

Rotate an image (2D array) by 90 degrees recursively with low memory usage

I'm looking for comments on coding style, passing arguments, ...etc. ...
5
votes
4answers
2k views

Image-processing algorithm on mobile device

I have written the following algorithm (for Android/NDK) to apply levels to a bitmap. The problem is that it is really very slow. On a fast device such as the SGSIII, it can take up to 4 seconds for ...
5
votes
3answers
11k views

Rotate image 90 degree clockwise

* Time complexity: O(N) * Memory complexity: \$O(1)\$ Is my calculation of complexity correct for this code? ...
5
votes
3answers
133 views

Image-grouping using bit matrices

It might be easier to read the explanation of what I was trying to do, and implement it a completely different way, rather than go through the code. But the code does what I want it to do, just ...
5
votes
3answers
107 views

Image filtering application

I'm building an image filtering application, and I'm new to the Java frameworks that I need to do so. Right now, I can apply a simple 3x3 kernel blur to my thing by overwriting the RGB values of the ...
5
votes
2answers
11k views

Rotate an image by 90 degrees

Looking for review, good practices, optimizations, clean code tips etc. ...
5
votes
1answer
131 views

Image edge detection

I have a Canny Edge Detection Code written in C++. I would like to know how can I make it more robust in terms of detecting all the edges correctly and save it? Is this the best possible edge ...
5
votes
2answers
2k views

Importing JPG, JPEG, and PNG images from a folder to an Excel worksheet

As I am a novice, I was keen to solve the task, so now I want to optimize the code. ...
5
votes
2answers
5k views

Simple image capture program

This program is eventually going to be a screen recorder, but right now I just want it to capture screen images. ...
5
votes
3answers
633 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? ...
5
votes
3answers
350 views

Simple image gallery

I have a simple gallery that hides and shows images. It works fine, however, I am not satisfied with my approach, and my code seems redundant. Can you check my code and give a better idea on how I can ...
5
votes
2answers
161 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 ...
5
votes
1answer
1k views

Simple Python + Gtk.Window

I'm learning Python and Gtk so I decided to write a simple application that will take some image let user annotate with a pen and send results through email or save to a file. So far I have the ...
5
votes
2answers
530 views

Photo changer loop

I just started Python a few days ago, and I haven't programmed much before. I know my code is terrible; however, I would like someone to look it over. What I'm trying to do is create a photo "loop" ...
5
votes
2answers
251 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
777 views

Write various EXIF data to Excel Sheet

I have a bunch of photos in a folder with various EXIF data, and I'd like to output various parts of it to Excel. I'm learning Python (currently using 2.7) and thought this would be a fun task for me ...
5
votes
1answer
4k views

Steganography - images within images

Normally, you would change the LSB of the RGB channels in a pixel, they would represent the bits you are storing in the image. My method differs in that I represent my bits as either odd or even ...
5
votes
1answer
184 views

App for painting images

I am a newcomer to jQuery and am working on an app that allows the user to paint images. To do that, I've created a color palette, and if a user clicks on a color, the paint brush successfully changes ...
5
votes
1answer
77 views

Create thumbnail in the original ratio without empty space

I need to make thumbnails without empty space and in the original ratio. Please help me check this algorithm to improve it. ...
5
votes
1answer
414 views

Image Processing codes running too slow

Situation I've written a simple black and white image filter application with JavaScript using html5 canvas. I have take two approaches, one with websockets and the other normally, the code is hosted ...
5
votes
1answer
244 views

Does this image-processing library break the Single Responsibility Principle?

I'm writing a small library to do some image-processing on GPU for WinRT, however, I'm not sure if such design breaks SRP. One class loads and saves image, renders and maintains filters - isn't it ...
5
votes
1answer
119 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 ...
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 ...
5
votes
1answer
1k views

User Avatar upload

I have been looking at some coding videos on Laracasts and the focus seems to be very readable code and keeping the controller clean. How can I clean this up? This code takes an uploaded user avatar, ...
5
votes
2answers
197 views

Swapping dynamically populated images on hover/touch

I'm using jQuery to swap images on hover. There's a main image, and a gallery of thumbs. When the thumb is hovered over/touched, the larger version of it populates the main image, and the smaller ...
5
votes
2answers
563 views

Accepting user defined functions for custom map reduce functionality in C++

I am implementing map and reduce - style functions for processing geospatial raster datasets. I would like the ...
5
votes
1answer
502 views

Converting images to greyscale using JuicyPixel

I would like to use Haskell to do some image processing so I have been writing small programs to test performance. I wrote a program to batch convert PNG images from color to greyscale. I compared the ...
5
votes
1answer
136 views

Computing the total different between a pixel and its neighborhood

I have C++ code which written for mex in MATLAB. It used to compute the total different between a pixel and its neighborhood (8 neighborhood in my code). The code ran and gave me an expected result. ...
5
votes
2answers
210 views

Mandelbrot image generator 2.0

I have rewritten my C Mandelbrot set image generator, including many suggestions given in my previous question (see: Mandelbrot image generator), as well as some recomendations by a friend. The total ...
5
votes
2answers
1k views

Parallelizing bitmap methods

I created a class called QuickBitmap to quickly get/set pixels in a Bitmap object. Using intertops I'm able to safely lock/unlock the bits of the ...
5
votes
2answers
3k views

Gaussian blur - convolution algorithm

My program uses graphics convolution, an algorithm that processes pixels to make them round, soft and blurred. This particular algorithm is well-known, but its slowing down the operation of the whole ...
5
votes
2answers
4k views

Selecting multiple images

I wrote this code to allow users to select multiple images, and each image can be selected multiple times. It feels convoluted, though, and prone to errors, such as forgetting to do something ...
5
votes
1answer
103 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 ...