image-processing

Quickly Plotting Polar Radar Data using Python?

一世执手 提交于 2021-02-10 19:57:28
问题 I've got an interesting application that requires transforming 3D polar data (angle, distance, and value at that point) into images representing the data. It's NOAA NEXRAD radar data that I'm using in a custom application. The data is stored in 3 arrays, range_data (the distance from the radar in meters, 1800 points), azimuth_data (the angle in 0.5 degree steps, 720 points), and radar_data (a 720x1800 array containing a data value for each combination of range and azimuth). This is the format

Setting values of a tensor at the indices given by tf.where()

陌路散爱 提交于 2021-02-10 17:57:24
问题 I am attempting to add noise to a tensor that holds the greyscale pixel values of an image. I want to set a random number of the pixels values to 255. I was thinking something along the lines of: random = tf.random_normal(tf.shape(input)) mask = tf.where(tf.greater(random, 1)) and am then trying to figure out how to set the pixel values of input to 255 for every index of mask . 回答1: tf.where() can be used for this too, assigning the noise value where mask elements are True , else the original

Ideal Low Pass Filter Concept in MATLAB

…衆ロ難τιáo~ 提交于 2021-02-10 16:22:43
问题 Please help me understand the following MATLAB code for Ideal Low pass filter. I am unable to understand the Part2 in the below code. Please explain me why we are doing like this. I have read the Rafael C. Gonzalez's Digital Image Processing Using Matlab 2E which explains my question but I couldn't understand properly. It will be helpful if someone could explain me clearly. Note: Dogbert, my understanding is that applying transform to an image help to separate low and high frequency

Get hue (HSV/HSB) value of RGB using Emgu C# yields wrong result

久未见 提交于 2021-02-10 14:58:43
问题 I am using EMGU.CV 3.4.1.2976 (latest) library to analyze images but I am not getting the results I expect. I benchmark against ImageJ but any image package should do. To test functionality, I am analyzing a simple blue 640x320 jpeg like below. The RGB value for this image is 0,0,255. Hue histogram from ImageJ (value is 170, count 2048000) Using code below I get a spike at 120 instead of the 170 - count 2048000 is correct though. What am I doing wrong? public void AnalyzeEmgu(object image) {

How to convert captured bitmap to 8 bit image as gray scale?

笑着哭i 提交于 2021-02-10 14:21:25
问题 I am trying to convert the camera captured image to 8 bit image. And that should be grayscale image. I searched in forums but could able to find the way to convert to 8 bit image. Any help or suggestion will be help ful to me. Thanks.... 回答1: You have given too little information. First of all, what is the image format your camera delivers? Is it some RAW format, jpeg, or what else? Doing it programmatically (using C for the example): The best way to go was to use some image loading library

How to convert captured bitmap to 8 bit image as gray scale?

笑着哭i 提交于 2021-02-10 14:20:06
问题 I am trying to convert the camera captured image to 8 bit image. And that should be grayscale image. I searched in forums but could able to find the way to convert to 8 bit image. Any help or suggestion will be help ful to me. Thanks.... 回答1: You have given too little information. First of all, what is the image format your camera delivers? Is it some RAW format, jpeg, or what else? Doing it programmatically (using C for the example): The best way to go was to use some image loading library

Why does openCV store a file larger(kB) than the original?

元气小坏坏 提交于 2021-02-10 14:13:13
问题 I have code that loads and saves the image in two different ways - first using openCV, the second using PIL. import cv2 from PIL import Image img = cv2.imread("/home/myname/png/image.png") cv2.imwrite("/home/myname/png/image_save.png", img) img = Image.open("/home/myname/png/image.png") img.save("/home/myname/png/image_save_pil.png") The original image is 204.6 kB in size. The result obtained with openCV is 245.0 kB, the result of PIL is 204.6 kB. Why does the image saved with openCV have a

Setup of IMTransform Video Processor for color space conversion

荒凉一梦 提交于 2021-02-10 12:44:16
问题 I am trying to do some basic color space conversion using Video Processor MFT. My camera natively supports NV12 and I need RGB24, to code some shader which will provide cartoon-like effect. Here is definition of class Media which is used to perform MF. class Media : public IMFSourceReaderCallback //this class inhertis from IMFSourceReaderCallback { CRITICAL_SECTION criticalSection; long referenceCount; WCHAR *wSymbolicLink; UINT32 cchSymbolicLink; IMFSourceReader* sourceReader; MFT_REGISTER

Detect overlapping noisy circles in image

限于喜欢 提交于 2021-02-10 08:01:38
问题 I try to recognize two areas in the following image. The area inside the inner and the area between the outer and inner - the border - circle with python openCV. I tried different approaches like: Detecting circles images using opencv hough circles Find and draw contours using opencv python That does not fit very well. Is this even possible with classical image processing or do I need some neuronal networking? Edit: Detecting circles images using opencv hough circles # import the necessary

How to combine images with boost gil?

依然范特西╮ 提交于 2021-02-10 06:58:18
问题 I am just getting familiar with Boost GIL (and image processing in general) and suspect that this is simple, but I haven't found the relevant documentation. I have a set of image views that I would like to combine with an arbitrary function. For simplicity, lets say the images are aligned (same size and locator type) and I just want to add the pixel values together. One approach would be to create a combining iterator from a zip_iterator and a transform_iterator, but I'm guessing that there