Image processing Is it possible to tell the quality level of a JPEG?

This is really a two part question, since I don't fully understand how these things work just yet: My situation: I'm writing a web app which lets the user upload an image. My app then resizes to something displayable (eg: 640x480-ish) and saves the file for use later. My questions: Given an arbitrary JPEG file, is it possible to tell what the quality level is, so that I can use that same quality when saving the resized image? Does this even matter?? Should I be saving all the images at a dec

Image processing Adaptive threshold Binarization's bad effects

I implemented some adaptive binarization methods, they use a small window and at each pixel the threshold value is calculated. There are problems with these methods: If we select the window size too small we will get this effect (I think the reason is because of window size is small) (source: piccy.info) At the left upper corner there is an original image, right upper corner - global threshold result. Bottom left - example of dividing image to some parts (but I am talking about analyzing ima

Image processing RAW Image file - what format is my data in?

I'm working on processing .raw image files, but I'm not sure how the image is being stored. Each pixel is a unsigned 16-bit value, with typical values ranging from 0 to about 1000 (in integer form). This isnt enough bits for hex values, and its not RGB (0-255) so I'm not quite sure what it is. Bonus: if you have any idea on how to convert this to grayscale in OpenCV (or just mathematically) that would be a huge help too.

Image processing Super slow Image processing on Android tablet

I am trying to implement SLIC superpixel algorithm in Android tablet (SLIC) I port the code which in C++ to work with android environment using stl-lib and all. What application doing is taking an image from camera and send data to process in native code. I got the app running but the problem is that it took 20-30 second to process a single frame (640 x 400) while in my notebook running with visual studio application would be almost instantly finish! I check the memory leak, their isn't any.

Image processing Inside-out image transform

After exploring the very excellent answer from Heike to my previous question about anamorphic transformations, I eventually wanted to see an image turned inside out completely. The idea is that, instead of just stretching the image out with an anamorphic transform, like you're pulling the edges of the paper around, you can actually turn the paper 'inside out'. The inside 'pixels' will be pulled out to the edges (greatly distorted/stretched), while the outside pixels will be squashed inwards to

Image processing Optimal approach for detecting leaf like shapes in opencv

I started to play around with OpenCV for a project I am working on. For this project I am growing plants in pots. Static pictures of different developmental stages are taken from above (see figure below). The goal is to detect and ultimately measure (i.e. size) the leaves of the growing plants during different developmental stages. I tried a naive approach of using Canny edge detecting, however it doesn't work that well (see figure below) because it also detects small edges in the soil (no m

Image processing Line function after projective transform

I have a question related to projective transform. Suppose now we know a line function ax+by+c=0in an image, and the image will go through a projective distortion, and the distortion can be represented as a projective transformation matrix : Then after the porjective transformation, how could I know the line function in the new distorted image? Thanks! ** EDIT ** Based on the suggestion, I have found the answer. Here, I posted the MATLAB codes to illustrate it: close all; % Step 1: show the

Image processing Adjustable sharpen color matrix

I am using .NET AForge libraries to sharpen and image. The "Sharpen" filter uses the following matrix. 0 -1 0 -1 5 -1 0 -1 0 This in fact does sharpen the image, but I need to sharpen the image more aggressively and based on a numeric range, lets say 1-100. Using AForge, how do I transform this matrix with numbers 1 through 100 where 1 is almost not noticeable and 100 is very noticeable. Thanks in advance!

Image processing OpenCV - detecting a shape in a shape collection (e.g. human in a group of humans)

I am performing blob extraction from video and using the blob's aspect ratio to classify into humans or vehicles. Works pretty well since vehicles and humans have quite differentiated aspect ratios. However this logic breaks down when a group of humans - say mother & child holding hands, or a group walking closely, come by and the blob detection is one single blob. I am wondering what the best approach to segmenting the image would be. Ideally I would also like to count the humans in the

Image processing minimum enclosing rectangle of fixed aspect ratio

I have an Image with many rectangles at different positions in the image and of different sizes (both overlapping and non-overlapping). I also have a non-negative scores associated with each of these rectangles. My problem now is to find one rectangle *of a fixed (given) aspect ratio* that encloses as many of these rectangles as possible. I am looking for an algorithm to do this, if anyone has a solution, even a partial one it would be helpful. Please note that the positions of the rectangl

Image processing Hardware implementation for integer data processing

I am currently trying to implement a data path which processes an image data expressed in gray scale between unsigned integer 0 - 255. (Just for your information, my goal is to implement a Discrete Wavelet Transform in FPGA) During the data processing, intermediate values will have negative numbers as well. As an example process, one of the calculation is result = 48 - floor((66+39)/2) The floor function is used to guarantee the integer data processing. For the above case, the result is -4,

Image processing How to perform power() function on RGB matrix in matlab

In a project, I need to perform power() function on RGB matrix in a matlab GUI program, but matlab keeps returning error meesage. Below is the code and the error message img_src = getappdata(handles.figure_pjimage, 'img_src'); R=img_src(:,:,1); G=img_src(:,:,2); B=img_src(:,:,3); C = 12; gamma = 0.8; R1 = C * power(R, gamma); G1 = C * power(G, gamma); B1 = C * power(B, gamma); R2 = power((R1 / C), (1/gamma)); G2 = power((G1 / C), (1/gamma)); B2 = power((B1 / C), (1/gamma)); disp(max(R2)); new_

Image processing Bilateral Filter defined by two gaussian functions

Hello, I need the C/C++ code for a bilateral filter defined by two gaussian functions. I saw a related question (Bilateral filter) asked before, but I need more clarification on the provided answer that I inserted below. Can somebody shed a light on it? void convolution(uchar4 *_in, uchar4 *_out, int width, int height, int ~ halfkernelsize, float id, float cd) { int kernelDim = 2*halfkernelsize+1; for(int y=0; y float sumWeight = 0; unsigned int ctrId

Image processing Invalid indexing operation error when trying to draw epipolar lines

I'm creating Stereo images processing project modeled on Matlab's examples. A copy pasted code from one of them don't works well. I1 = rgb2gray(imread('viprectification_deskLeft.png')); I2 = rgb2gray(imread('viprectification_deskRight.png')); points1 = detectHarrisFeatures(I1); points2 = detectHarrisFeatures(I2); [features1, valid_points1] = extractFeatures(I1, points1); [features2, valid_points2] = extractFeatures(I2, points2); indexPairs = matchFeatures(features1, features2); matchedPoint

Image processing Finding known text in an image (guided OCR)

I'm looking for a way to locate known text within an image. Specifically, I'm trying to create a tool convert a set of scanned pages into PDFs that support searching and copy+paste. I understand how this is usually done: OCR the page, retaining the position of the text, and then add the text as an invisible layer to the PDF. Acrobat has this functionality built in, and tesseract can output hOCR files (containing the recognized text along with its location), which can be used by hocr2pdf to gene

Image processing The steps to do object detection in natural image?

I am new to computer vision, can anyone tell me the steps to do object detection in natural image? (Here object refers to logo). I drafted the following steps based on my own understanding: Problem statement: Suppose there are 20 reference logos, given an natural image, tell out which logo exists in the image and in which location (bounding box). Step1: Collect many (i.e. 100) images containing corresponding logos, and crop out the logo region. Hence, there are 100 examples for each logo. The

Image processing How to implement optical flow using belief propagation?

I'm not sure if I can ask these kind of questions in stackoverflow, but I saw some questions about understanding algorithms here, so I'm posting my question. If it is inappropriate, please let me know. I'm trying to implement optical flow using BP(Belief Propagation) algorithm, but I'm lost. I've saw http://www.cs.cornell.edu/~dph/papers/bp-cvpr.pdf this link, and they says that they implemented OF with BP, but I cannot understand how. They posted their code here, but it only includes stereo

Image processing Should I use a high pass filter or low pass filter to enhance the features for image splicing detection?

I'm recently learning image splicing detection.I've already known image splicing can bring some abrupt changes to an image,which generate the sharp edges.And sharp edges correspond to high frequency. And I want to extract features from images for splicing detection.In my opinion,I should use a high-pass filter to enhance the edges,but I've read some papers which mentioned using a low-pass filter for gradient detection techniques applied in discontinuity detection. Now I am very bothered with thi

Image processing Merging greyscale channels into a color composite

I'd like to know how to (in code) merge multiple grayscale images into a single 16-bit RGB color image, using color look-up tables (LUTs). In ImageJ, one is able to take, say, 7 different 16-bit grayscale images, and merge their values into a single color composite. It's trivial for the case where you have <= 3 images, and the desired mapping of input image to color channel is exclusive. That is, if I had three 16-bit greyscale images, and I wanted image 1 to be red, 2 to be blue, and 3 t

Image processing Uniquely assign predicted objects/regions to groundtruth objects/regions

I have a list of groundtruth objects (blue; 1-4) and a list of predicted objects (red; a-d). To calculate metrics for evaluating the performance of the prediction, I need to assign predicted objects to groundtruth objects. No object should be used twice! The graphic shows on the right some possible solutions (X, Y, Z) to the problem, where purple areas indicate the overlap between to matched objects. To implement this, I created an intersection matrix that contains intersections (with an ove

Image processing Example usage of a libyuv API MJPGToI420()

I'm trying to use a libyuv API, more specifically MJPGToI420(). I want to first take a jpeg image as input to MJPGToI420(), the signature of which is below: int MJPGToI420(const uint8_t* sample, size_t sample_size, uint8_t* dst_y, int dst_stride_y, uint8_t* dst_u, int dst_stride_u, uint8_t* dst_v, int dst_stride_v, int src_width, int src_height,

Image processing How does a predictive coding aid in lossless compression?

I'm working on this lab where we need to apply a lossless predictive coding to an image before compressing it (with Huffman, or some other lossless compression algorithm). From the example seen below, it's pretty clear that by pre-processing the image with predictive coding, we've modified its histogram and concentrated all of its grey levels around 0. But why exactly does this aid compression? Is there maybe a formula to determine the compression rate of Huffman, knowing the standard deviat

Image processing Vine Row Detection in Noisy Image

I'm trying to detect vine rows to use in plant health detection and crop yield in an image that contains a lot of trees, other vegetation and insignificant objects. The objects and trees can be in between the vine rows and need to be segmented before further processing. The images are multispectral, taken by UAV. Plan A is to use DCM and NDVI agricultural indexes, and use a threshold to cut off the ones that are too high for a vine row. However, the UAV we use can give some bad results for DCM

Image processing Pytorch Autoencoder - How to improve loss?

I've a UNET style autoencoder below, with a filter I wrote in Pytorch at the end. The network seems to be converging faster than it should and I don't know why. I have a dataset of 4000 images and I'm taking a 128x128 crop every time. I'm employing a training rate schedule and weight decay. I've tried fiddling with my parameters with a tiny dataset to see improvements but nothing seems to work. Once the learning rate goes down, the loss just bounces around and doesn't hit a floor, and in some ca

Image processing Can Keras ImageDataGenerator rescale an image between -1 and 1

I'm currently building a GAN for images on my local directory. So I'm using the Keras.ImageDataGenerator flow_from_dir constructor. I'd want to normalize my images between -1 and 1 that's the convention for GANs cause of the tanh activation. I'm having problem in rescaling the image like implementing 1/127.5 -1 in the rescale argument. from tensorflow.keras.preprocessing.image import ImageDataGenerator fid = drive.ListFile({'q':"title='NM_cycleGAN.zip'"}).GetList()[0]['id'] f = dr

Image processing What is the fastest way to send images to REST API?

I have a React Native application to get frames from user camera and a REST API (FastAPI) to process images with OpenCV and classify with Tensorflow. I need to send images larger than 768x432 (RGB) to API but when I send them as raw 3d array in JSON request body, it's takes almost 2 seconds to get image array at server side. How should I send frames in faster way? (Like encoding, compressing or changing data format...) Thanks.

Image processing Automated Webcam Application / Hardware Problems

I am starting to develop an automated webcam application. The goal is to automatically take pictures, do some image processing and then upload the results to a FTP site. All of these tasks seem simple. However, I am having a hard time to find a decent camera. I don't want to use a simple webcam or hd-webcam because the image quality of still frames isn't very good. I'm also having a hard time finding an affordable digital camera supporting USB snapshot or control. My second concern is the de

Image processing Is there a way to detect the main ROI?

i want detect the important ROI Element in a picture. (i want to get the position) I've tested a reverted SeamCarving-Method. I hoped, that the most importand Area in a picture have the most energylevel. I've generated one vertical and one horizontal Seam and took the intersection. But this method don't seem to be perfect. Some examples: good detection: good detection http://img713.imageshack.us/img713/2928/seamcastle.jpg good detection http://img39.imageshack.us/img39/9584/seamente.jpg good de

Image processing Finding shapes using OpenCV Haar cascaded classifier

I am looking for parabolas in some radar data. I am using the OpenCV Haar cascaded classifier. My positive images are 20x20 PNGs where all of the pixels are black, except for those that trace a parabolic shape--one parabola per positive image. My question is this: will these positives train a classifier to look for black boxes with parabolas in them, or will they train a classifier to look for parabolic shapes? Should I add a layer of medium value noise to my positive images, or should they

Image processing Fourier-Mellin transform in mathematica

I'm just getting into image processing, but I'm relatively noobish so far ;). My aim is to detect circles with different radii with noise in mathematica. After a little bit of reading about the subject matter I found out, that the Fourier-Mellin transform seems to be an adequate method (because invariant to rotation and scaling). But I really don't know how to translate the formulas I found in papers into a code. Can anybody help me out with a code in mathematica how to perform a Fourier-Mellin

Image processing Image Processing in NVIDIA CUDA GPU

Is it possible that Image Processing can be implemented NVIDIA CUDA GPU? My Thesis proposal is .. i'm going to create an Optical Character Recognition which is being implemented in NVIDIA GPU. Is there anyone has an idea about this ? Is it really possible ? Do i have to pursue it ?

Image processing Having a neural network output a gaussian distribution rather than one single value?

Let's consider I have a neural network with one single output neuron. To outline the scenario: the network gets an image as input and should find one single object in that image. For simplifying the scenario, it should just output the x-coordinate of the object. However, since the object can be at various locations, the network's output will certainly have some noise on it. Additionally the image can be a bit blurry and stuff. Therefore I thought it might be a better idea to have the network o

Image processing Is LSH about transforming vectors to binary vectors for hamming distance?

I read some paper about LSH and I know that is used for solving the approximated k-NN problem. We can divide the algorithm in two parts: Given a vector in D dimensions (where D is big) of any value, translate it with a set of N (where N<<D) hash functions to a binary vector in N dimensions. Using hamming distance, apply some search technique on the set of given binary codes obtained from phase 1 to find the k-NN. The keypoint is that computing the hamming distance for vectors in N dime

Image processing How to Split and Merge Erroneously Segmented Regions

I have performed the watershed segmentation on a picture of clustered cells. There seems to be many clusters of cells that have not been segmented enough or not at all. There are also single cells that have been oversegmented. What methods could I use to merge the oversegmented single cells and further split the undersegmented clusters of cells? Edit: The criteria for determining whether a cell has been over or undersegmented will be done by determining whether the area of the cell is within a

Image processing A keyword for an "interesting point" in an image?

Actually I am searching for today's state of the art neural network model for detecting "an interesting point" in an image but I lacks the proper keyword for it. For example, if an image is a portrait that point might be person's face. If it is an image of one flower in a vest, that point would be the flower's petals. It is the point that would catch the viewer's eye first. I want to know are there any convolutional neural network model that takes an input image and return a point like this? F

Image processing Trying to add a stroke around a PNG, can it be improved?

I'm trying to find a good way to add a 3px white stroke to a ton of png files, effectively to make them look like "stickers." I've got some sample code that does a decent job, but I can't seem to get the cropping right. Also, the stroke looks a bit pixelated and I wanted to know if it's possible to get cleaner edges! I did a bunch of internet scouring, found some sample code, tweaked it around, and came to something that almost resembles what I'm looking for. The images are always going to be P

Image processing How does image processing work in Apache Tika

I'm using Apache Tika to extract text from images. Tika in turn uses tesseract to recognize text. But comparing the output from Tika and Tessaract (which I have also installed as a standalone commandline tool) I've noticed that the former gives much better results than Tesseract alone. So does Tika use some bundled image preprocessor to improve the image quality prior to calling the bundled Tesseract instance? Or does Tika pass some arguments to Tesseract to improve the results?

Image processing image preprocessing methods that can be used for identification of industrial parts name (stuck or engraved) on the surface?

I am working on a project where my task is to identify machine part by its part number written on label attached to it or engraved on its surface. One such example of label and engraved part is shown in below figures. My task is to recognise 9 or 10 alphanumerical number (03C 997 032 D in 1st image and 357 955 531 in 2nd image). This seems to be easy task however I am facing problem in distinguishing between useful information in the image and rest of the part i.e. there are many other numbers

Image processing linear interolation between geospatial points

I have an issue where I am trying to do the following: I have 4 points in the image for which I know the geospatial coordinates i.e. their latitude and longitude. Now, I wanna assume linear interpolation between the points and outside it. So, my question is given another (x, y) point in the image how can I find the associated interpolatited latitude, longitude from it. So, I have something like: X_1 X_2 X_4 X_5

  1    2   3   4   5   6  ... 下一页 最后一页 共 19 页