The Stack Overflow podcast is back! Listen to an interview with our new CEO.

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
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 ...
3
votes
0answers
342 views

PCA, LDA and Logistic Regression

Based on the great blog by Joel Grus, I implemented LogisticRegression, PCA, and LDA. I'd appreciate feedback as I'm not sure that the logistic classifier is good enough (as it supposed to achieve ...
2
votes
1answer
406 views

Picasso's Transformation class to Crop borders from Image

It's a implementation of Transformation from Picasso library looks for the first different pixel color in both sides, in the vertical and horizontal, and crops the bitmap from there. Here is the ...
6
votes
1answer
181 views

Image processing and plotting

I wrote a program for analyzing pictures. The problem I'm having is very slow processing time for medium images like 800x800. I think the root of the problem for this is the ...
4
votes
2answers
9k views

Function that Loads a Random Image from an Array

I'm new to PHP and had to put together a function that loads a random image from an array (it works fine). Here's what I came up with. Could it be improved? Any feedback would be appreciated. ...
0
votes
1answer
509 views

Using hash_file for image recognition

My team is writing software to be able to grade a basic skills in word/excel/powerpoint test. We are trying to figure out the best way to verify that they included a correct image in their word doc. ...
2
votes
0answers
685 views

Optimize GPU usage for real-time object detection from camera with TensorFlow GPU and OpenCV

Trying to recognize objects real time using TensorFlow Object Detection API OpenCV using ssd_mobilenet_v1_coco_11_06_2017 model in GPU. ...
13
votes
1answer
1k views

OpenCL implementations of IQZZ and IDCT for MJPEG

I am using this code for MJPEG decoding and I am trying to make two functions (IQZZ and IDCT) run faster on the GPU (NVIDIA Tesla k20c). I am using the OpenCL framework to accomplish this task. I ...
5
votes
1answer
91 views

Painting a lot of diagrams for a board game

I'm creating a chess application and I would like to show plenty of big chess diagrams in scrollview. At the moment I just create ImageView for every diagram, create bitmap into it, paint the diagram ...
15
votes
6answers
14k views

Determine if an image is opaque or transparent

I wrote an extension method defined for the Image Class (System.Drawing) — which returns a Boolean value telling you if the image is opaque or transparent. The color of each pixel in the image is ...
2
votes
0answers
44 views

Ensuring images will look as best as possible on any size using object-fit and a container class

This is a snippet from my codebase. Here's how I write markup for my images. In order to make sure that, no matter the specs of the image, it will look as best as possible most of the time: ...
3
votes
2answers
6k views

Getting images and saving them to localstorage

The code in this project accepts an image URL and creates an <img> tag dynamically, using the image URL as the src attribute value. The image *name *and URL ...
3
votes
2answers
2k views

Calculate True Positive, False Positive, True Negative and False negative and colourize output

Objective : Calculate True Positive, False Positive, True Negative and False negative and colourize the image accordignly, based on ground-truth and prediction from my classifier model. Problem : ...
5
votes
1answer
4k views

Generate video thumbnail

I wrote a simple, yet disgusting video thumbnail image generator method—which uses the MediaToolkit .NET library. The code is not self-explanatory whatsoever, and it's extremely inefficient. It ...
3
votes
2answers
564 views

Detecting if image taken by camera is too dark

I am trying to build functionality to check if an image taken by the camera is too dark. So I added the following 2 functions to a utility class: ...
3
votes
2answers
305 views

Scraping names and images of products from a webpage

I've written some code in python to scrape item names, category and the variety of images connected to each item from four different links out of a webpage. The main problem with which i had to hurdle ...
7
votes
1answer
187 views

Basic OCR using a 1-Layer Neural Network in Haskell

I've used this tutorial in order to learn the basics of creating a neural network from scratch. The program is meant to read handwritten numbers from the MNIST database. The author of the tutorial ...
13
votes
4answers
48k views

Resizing image but keeping aspect ratio

I wrote some code that resizes an image to fit in a given box. I think that some parts of the code are not needed (for example if it's a box image). Is there a more efficient way to do this? Is there ...
4
votes
0answers
3k views

Capture, display, and save webcam video with openCV using C++

The basics were taken from one of the more basic OpenCV examples. Any comments are welcome regarding style and conventions, etc., as well as tips on using the OpenCV library, which I'm new to. Also, ...
0
votes
1answer
1k views

Pure JS multi-slide carousel

On our home page we need simple multi-slide carousel. It is our highest traffic page, so we decided to remove all libraries (including jQuery) in order to increase page speed. Functionality we trying ...
5
votes
1answer
102 views

Make a PPM chain showing a maze generated and solved

Beware: if you run this program with default configuration, it will produce from ~250 to ~1000 plain PPM images in the directory it's being run in, which all summed up will weigh ~4MB. These PPMs can ...
2
votes
1answer
311 views

Parallelly resizing mutiple photos

This code snippet is supposed to utilize async await to resize a photo file into multiple sizes in parallel. I just want to know if I am doing it in the right way. I would love to hear some ideas on ...
3
votes
2answers
3k views

Download image links posted to reddit.com

This is a Python script to save imgur pictures posted to reddit.com forums. I'm looking for an assessment on the design of this script and any web security issues that might exist. Obvious ...
3
votes
2answers
905 views

Python image encryption security analysis

I'm currently seeking someone to review the source code for an image encryption program in Python 2.7. The code is complete and should run provided you have installed the correct packages. For this ...
5
votes
1answer
216 views

RFC PS Rasterizer Library API

We've got the basic functionality of using my postscript interpreter, xpost, as a library. I'd like to solicit some feedback from the community on the API setup. ...
2
votes
2answers
594 views

Extract images from a PDF or ZIP file

Input inputBlob - A PDF or ZIP file containing all the pages of many students' test papers. extension - The file type ("pdf" or ...
3
votes
1answer
69 views

Avoiding Boundaries `if` Cases When Filtering Image Matrix

I have the following MATLAB Code which I want to optimize. It's related to an image matrix (2D) which I want to filter. Though it is MATLAB code, the same problem would arise in C code. The problem ...
1
vote
2answers
1k views

Image Compression Using the Singular Value Decomposition (SVD) with MATLAB

I'm new to both linear algebra and MATLAB. I need help with this code with the objective of compressing image using the Singular Value Decomposition (SVD). The code is currently working, if I run with ...
6
votes
3answers
226 views

Class scheduling tool with image output

I have a multilayered dictionary that contains information about classes. I am using this to code an automatic schedule builder that I will eventually add to a separate Tkinter application I made that ...
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 ...
7
votes
2answers
861 views

Image cache for lots of images 2.0

Following from this question I created a Image cache of sorts (let's call it version 1.0) that used WeakReference as "cache" items. And this comes from the ...
0
votes
2answers
2k views

Optimize code use to drawing image

Below I have posted the code I use for drawing pictures. The problem is that when I want to generate more images in full hd size (in loop), the generation time increases significantly. Can somehow ...
2
votes
1answer
360 views

Transform byte array into upside down array of floating point pixels

I need to do the following in Python 3.x: Interpret an array of bytes as an array of single-precision floats. Then group each four consecutive floats into subarrays, i.e. transform ...
1
vote
0answers
283 views

Scraper for parsing, downloading, and setting images beside each link in an excel file

I've written a script in VBA which is able to parse image links from a website, download and store them in a local folder and finally set those images beside each link in an excel file. As the script ...
3
votes
1answer
737 views

Correction for barrel and pincushion distortion

I have a c++ dll I am calling (PInvoking) from C# which corrects barrel and pincushion distortion. Basically I call a method which generates a set of look up arrays and I adjust the pixels of the ...
1
vote
1answer
2k views

Finding the 20th percentile pixel of an image using a histogram instead of std::sort

I have a 2-dimensional matrix (an image) in which I need to find the 20th percentile value. My first attempt was to sort the values and then index using ...
3
votes
1answer
4k views

Scraper for downloading and saving images from web page

I've written some code using Python 3 to scrape movie names, links to the movie posters, and finally save the pictures on the local drive after downloading them from a web page. I have used two ...
2
votes
1answer
1k views

Class for scraping images with JSoup

I refactored this class as far as I'm capable of at the time but I wonder if it can't be better. One thing that I'm not sure of, is that I take parameters from a method, which is not a constructor, ...
2
votes
1answer
3k views

Scraping images from a webpage and saving it to a customized folder using vba

I've written a script in VBA which is able to scrape images from a webpage and save it to a customized folder successfully. Firstly, it scrapes the image link then downloads the image and rename it ...
1
vote
1answer
851 views

Color scale in range

I need to select a color given a position within a range. Using the "bwr" colormap shown below, I want to return a blue color for a value at the beginning of the range, a red color for a value at the ...
7
votes
1answer
196 views

Image editing in the frequency space

I wrote a little script that should load a GUI for deciding the bandpass filter. I'm a hobbyist programmer so I look here for comments that will help to improve my code abilities. The applet should ...
4
votes
1answer
101 views

Analyzing the color composition of a video

Here is a snippet of code from a project I have been working on that can be found here. I am looking for suggestions on how I can improve my code to make it cleaner and maybe improve performance. <...
3
votes
1answer
94 views

Resizing and recoloring a logo using PHP GD Library

I have the following code, that works very well. However I'm about to launch it to 5000 users and will no doubt take a beating early on. I want to ensure that if there are any opportunities to ...
6
votes
0answers
282 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 ...
5
votes
2answers
747 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 ...
7
votes
1answer
347 views

Python Steganographer using PIL

I've made a Python Steganographer using the Python Imaging Library. It basically encodes the binary text in the last 'n' bits of the red content in each pixel of the image. Here is my code, please ...