Issue i’ve been trying to use angular masonry. I’ve been trying to do something like when hovering over an image, the image will darken, and the caption will be more exposed (high-contrast) over the image to be able to read
Continue readingTag: image
Why does Chrome make a request for already cached image with max-age header?
Issue My goal is to cache images in browser’s cache. Current setup Cache-Control: public, max-age=10368000 header is attached to the requested image to cache the image. Furthermore, ETag: f5f9f1fb39790a06c5b93735ac6e2397 header is attached too to check if image has changed once
Continue readingDetermine if an image is cached in browser (either memory or disk cache) before displaying the image?
Issue For lazy-loading visualization, I’m attempting to apply a fade-in animation style class only to images that have not been cached in the browser. To determine if an image was previously loaded and cached in the browser, we can employ
Continue readingIs there a way to convert a code-file to an image with syntaxhiglighting
Issue I try to convert Pascal-Code Files to an image (jpg, png) an find pongo-view as a good solution. Is there a way to add syntax-highlighting in the Output files? I am happy about any hints 🙂 Thanks Solution I
Continue readingstackblitz example for ngStyle background-image is not successfully rendering image in DOM
Issue My goal is to provide a dynamic image by binding to the background-image attribute. Here is a Stackblitz exemplifying the current state of the problem. As you can see… I have tried sanitizing the string that I am feeding
Continue readingAngular ng-class depending on image aspect
Issue How can I set a ng-class (inside ng-repeat) depending on image aspect ratio? something like… <div ng-repeat=”img in images” style=”width: 100px; height: 100px;”> <img ng-src=”{{img}}” ng-class=”{‘wide’: img.width/img.height > 1, ‘tall’: img.width/img.height <= 1}” /> </div> EDIT: CSS object-fit doesn’t
Continue readingAndroid emulator camera custom image
Issue Does anybody know is it possible to open some personal picture when emulator camera starts? I have an application which is based on image analysis and I would like when I click a button for camera that camera opens
Continue readingAdding checkmark image with no background
Issue I have a page with tabs along the left side. each tab opens a form in middle of page. When the user fills out a form correctly, I want to add a checkmark to that tab. I have tried
Continue readingFile.ReadAllBytes doesn't read the PNG image pixels properly
Issue I am trying to read the bytes of a .png image using File.ReadAllBytes(string) method without success. My images are of size 2464x2056x3 (15.197.952 bytes), but this method returns an array of about 12.000.000 bytes. I tried with a white
Continue readingIncorrectly calculating dialog box position because of dynamic image loading?
Issue I’m working on a gallery type application – one template puts together a popup dialog for a larger view of thumbnail images when clicked. The server path to the image is included as a template variable. Gallery.Templates.Popup = “\
Continue readingHow to add dotted or dashed line to png in Python?
Issue Hello I want a draw a dashed or dotted line to png, I couldn’t find How can I do that, Can someone help ? im = Image.new(‘RGB’, (2000,2000),tuple(int(hex_color[i:i+2], 16) for i in (0, 2, 4))) print("…Saving…") im.save(‘C:\\Users\\th3m1s\\Desktop\\Lejant\\’+str(legend_code)+’.png’, quality=100) Result
Continue readingi want to change every single pixel of an img to black exluding transparent python
Issue I want to edit all the pixels of a PNG image except for the transparent pixels. I have this code: img_da_maskerare = Image.open("temp.png") width = img_da_maskerare.size[0] height = img_da_maskerare.size[1] for i in range(0,width): for j in range(0,height): data =
Continue readingEncoding QR data as PNG using C and stb_image_write
Issue im trying to render QR to image (png, svg) using QR-Code-generator-1.8.0 and stb_image_write, i follow the example on demo example and generate the QR correctly but very small and i dont know how to scale it, i suppose must
Continue readingIs there a way to use JavaScript to convert a PNG's white background to a transparent background?
Issue I have a bunch of .pngs that have nothing but black text on a white background. Until now these have all been displayed on a white background on the screen, so there has been no problem; but now, I
Continue readingHow to determine an image's encoding
Issue I have an image with a PNG extension. I suspect it’s not really a PNG though (I think it might be a GIF). How can I confirm an image’s encoding? NB: A solution for Windows would be preferable Solution
Continue readingHow to set the image quality while converting a canvas with the "toDataURL" method?
Issue I want to set the quality factor when I encode a canvas element to jpg. var data = myCanvas.toDataURL( “image/jpeg” ); It does not give me a quality option. Is there an alternative library I can use? Related: what
Continue readingCan anyone clearify how to get tiff rating metadata in C++ or just the file rating the way Win Explore reads it?
Issue Hey I’m completely lost when it comes to reading the tiff metadata in C++, I’ve looked over google and can’t find any examples. All i want to do is read the rating property and output that to console i
Continue readingHow to change the star-image of Jquery star rating from fyneworks to a different image
Issue Im using this plugin: http://www.fyneworks.com/jquery/star-rating It includes a star.gif (which actually contains the star in three different colors) and it only references this gif within the included css-file once: div.star-rating,div.star-rating a{background:url(star.gif) no-repeat 0 0px} I dont want to use
Continue readingRuby on rails display star images for the rating system
Issue I have a simple rails application where a user can leave a rating for a product and at the minute I have it so that the average rating is displayed on the index page, so for the book Animal
Continue readingHow to convert input text to image?
Issue I’ve created a rating star system that allows user to rate 1-5. How do I change the numbers 1-5 to stars? These are the codes below that show the numbers for the user to rate. <?php foreach(range(1,5)as $rating):?> <a
Continue readingRuby on Rails display half a star for a decimal rating, e.g. 4.5
Issue I am able to view 5 asterisks for a rating of 5 for a product, and 4 asterisks for a rating of 4 etc. But what I would like to do is replace the asterisks with an image of
Continue readingHow to merge two image in Xamarin Forms?
Issue I’m developing a Xamarin Forms iOS app. In the xaml file, there is a grid. <Grid x:Name=”QrCodeSite” HeightRequest=”300″ Margin=”37, 37, 37, 0″> <Grid.RowDefinitions> <RowDefinition Height=”*” /> </Grid.RowDefinitions> </Grid> In the related .cs file, I use ZXing.Net.Mobile.Forms to generate a
Continue readingTrouble generating Barcode using ZXing library with large data
Issue I need to generate barcode in 128A format with data: 900000588548001100001305000000000207201512345.6|12345.7 I’m using ZXing library and Here is my method: private void barcodeGenerator(String data) { try { com.google.zxing.MultiFormatWriter writer = new MultiFormatWriter(); BitMatrix bm = writer.encode(data, BarcodeFormat.CODE_128, 700, 200);
Continue readingThe train and validation accuracy of image classification with single class data are wrong and want to fix this
Issue I have built an image classification program using 32 images for train and 16 images for validation with batch size of 16 and 10 epochs. I have used ImageDataGenerator(rescale=1./255).flow_from_directory(image path and other parameters) for train and validation images. I
Continue readingWhat is the appropriate input shape for a 2D CNN-based network?
Issue I am having trouble passing the appropriate input shape to a CNN-based network with a Conv2D layer. Initially, these are my train shapes. My train data is reshaped into windows: X_train: (7,100,5185)= (number of features, window size, number of
Continue readingChange all images in training set
Issue I have a convolutional neural network. And I wanted to train it on images from the training set but first they should be wrapped with my function change(tensor, float) that takes in a tensor/image of the form [hight,width,3] and
Continue readingLoad Initial Image to Page AngularJS
Issue I have a list of names from the model that are listed on the page when the page loads. When i click the name, the corresponding image from the model appears on the page. Is there a way within
Continue readingFiltering Images with Button Clicks AngularJS
Issue I’m needing to filter images based on category in the model. I’ve created buttons for the category. E.g. if user presses Lake Pics button, would like it to filter all of the images with the category ‘lake’ in the
Continue readingDetermine if a point is inside or outside of a shape with opencv
Issue I have images with white background and simple shapes in them (each image has one shape). I want to determine if a certain point (x,y) is inside the shape or not. How can I do that with opencv? Solution
Continue readingAutomatically cropping an image with python/PIL
Issue Can anyone help me figure out what’s happening in my image auto-cropping script? I have a png image with a large transparent area/space. I would like to be able to automatically crop that space out and leave the essentials.
Continue readingArmadillo porting imagesc to save image bitmap from matrix
Issue I have this matlab code to display image object after do super spectrogram (stft, couple plca…) t = z2 *stft_options.hop/stft_options.sr; f = stft_options.sr*[0:size(spec_t,1)-1]/stft_options.N/1000; max_val = max(max(db(abs(spec_t)))); imagesc(t, f, db(abs(spec_t)),[max_val-60 max_val]); And get this result: I was porting to C++
Continue readingHow to add a row of pixels at the bottom and to the right of an image?
Issue So Im experiencing an issue with a framework that Im working with, where the images sort of get translated by 1 pixel downwards and one pixel to the left (making the pixel data wrong). To counteract this I would
Continue readingHow to recognise adult content programmatically?
Issue I am currently developing a website for a client. It consists of users being able to upload pictures to be shown in a gallery on the site. The problem we have is that when a user uploads an image
Continue readingPython: Image resizing: keep proportion – add white background
Issue I would like to create a Python script to resize images, but not changing its proportions, just by adding a white background (So, a : 500*700 px image would transform to a 700*700 px image by adding 100 px
Continue readingPython OpenCV Color Tracking
Issue Below is my python code for tracking white color objects. It works – but only for a few seconds and then the whole screen turns black and in some times it not work. I experimented with blue color and
Continue readingHow to find extreme outer points in an image with Python OpenCV
Issue I have this image of a statue. I’m trying to find the top, bottom, left, and right most points on the statue. Is there a way to measure the edge of each side to determine the outer most point
Continue readingHow to convert PNG to JPG in Python?
Issue I’m trying to compare two images, one a .png and the other a .jpg. So I need to convert the .png file to a .jpg to get closer values for SSIM. Below is the code that I’ve tried, but
Continue readingHow to determine between inner and outer contour with Python OpenCV?
Issue I want to have a polygon region of interest and would like to perform an object detection algorithm within this area. For example, the user gives some points and I want to create a polygon with them in my
Continue readingHow to crop and extract stamp from an image with OpenCV?
Issue I am new to OpenCV. I have a "simple" image of a stamp that I have already processed a bit, as you can see in the code below. Now I have the problem of cropping the image to get
Continue readingImage noise removal is part of image enhancement or image restoration?
Issue I am working in digital image processing field, recently I am studying about Image Noise, I just want to know that whether this noise removal is part of image enhancement or image restoration. I have read some papers on
Continue readingCounting curves, angles and straights in a binary image in openCV and python
Issue I want to write a tool for finding the number of angles, curves and straight lines within each bounded object in an image. All input images will be black on white background and all will represent characters. As illustrated
Continue readingHow to antialias picture to get rid of the jerkiness in the image
Issue I am trying to antialias a picture and tried few methods, with open CV and with matplotlib and also with PIL. But still can’t get rid of the jerkiness. This is the picture for antialiasing. The first method I
Continue readingHow to remove specific tag/sticker/object from images using OpenCV?
Issue I have hundreds of images of jewelry products. Some of them have "best-seller" tag on them. The position of the tag is different from image to image. I want iterate over all images, and if an image has this
Continue readingCompare two images and find all pixel coordinates that differ
Issue I have designed a program that compares two images and gives you the coordinates of the pixels that are different in both images and plots the using pygame. I do not mind having to use another library or to
Continue readingParticle detection with Python OpenCV
Issue I’m looking for a proper solution how to count particles and measure their sizes in this image: In the end I have to obtain the lists of particles’ coordinates and area squares. After some search on the internet I
Continue readingCV – Extract differences between two images
Issue I am currently working on an intrusion system based on video surveillance. In order to complete this task, I take a snapshot of the background of my scene (assume it’s totally clean, no people or moving objects). Then, I
Continue readingHow to detect checkboxes by removing noise using Python OpenCV?
Issue I am trying to identify the checkboxes in the image The top 4 are identified but the bottom 2 are not. At the same time I would like to be able to get rid of the peppering to avoid
Continue readingHow to extract multiple objects from an image using Python OpenCV?
Issue I am trying to extract object from an image using the color using OpenCV, I have tried by inverse thresholding and grayscale combined with cv2.findContours() but I am unable to use it recursively. Furthermore I can’t figure out how
Continue readingHow to detect and find checkboxes in a form using Python OpenCV?
Issue I have several images for which I need to do OMR by detecting checkboxes using computer vision. I’m using findContours to draw contours only on the checkboxes in scanned document. But the algorithm extracts each and every contours of
Continue readingHow to detect corners of a square with Python OpenCV?
Issue In the image below, I am using OpenCV harris corner detector to detect only the corners for the squares (and the smaller squares within the outer squares). However, I am also getting corners detected for the numbers on the
Continue readingHow to approximate jagged edges as lines using Python OpenCV?
Issue I am trying to find accurate locations for the corners on ink blotches as seen below: My idea is to fit lines to the edges and then find where they intersect. As of now, I’ve tried using cv2.approxPolyDP() with
Continue readingWhat are the latest DeBayer/Demosaicing technics
Issue In an effort to improve the image quality I’m getting from a camera I started digging up alternative demosaicing technics. I found out that there are allot of different algorithms but most of them are dated back to 2000.
Continue readingHow to find corner (x, y) coordinate points on image Python OpenCV?
Issue This is a truck container image but from the top view. First, I need to find the rectangle and know each corner position. The goal is to know the dimension of the container. Solution Here’s a simple approach: Obtain
Continue readingHow to segment object from the background of an image Python OpenCV?
Issue I’m trying to segregate a tower from its background. To do this I’ve defined an upper and lower limit HSV range of object color as shown below, but it only segregates partial object from its background, as the object
Continue readingPytesseract image_to_data not able to read the numbers in my image
Issue So I’m currently working on a project where I use pyautogui and pytesseract to take a screenshot of the time in a video game emulator I’m using, and then to try and read the image and determine what time
Continue readingHow to detect multiple colored regions in an image and produce individual crops for each with Python OpenCV?
Issue I have an image like this: And I want to crop the image anywhere there is red. So with this image I would be looking to produce 4 crops: Obviously I first need to detect anywhere there is red
Continue readingHow to extract green objects in an image?
Issue I have ROI’s for the bounding boxes around the objects in an image. The ROI’s are obtained by the Faster R-CNN. Now I want to get the green spike objects contained within the bounding box. After getting the ROI’s,
Continue readingHow to perform image lighting correction with OpenCV?
Issue I have an image which I grab using a camera. Sometimes, the lighting is uneven in them image. There are some dark shades. This causes incorrect optimal thresholding in EMGU as well as Aforge to process the image for
Continue readingHow to find individual numbers in an image with Python OpenCV?
Issue I have an image similar to the following. I want to separate two numbers 7 and 4 as shown in the image, in that I want to have a bounding box for each of these two objects. How could
Continue readingDetect and fix text skew by rotating image
Issue Is there a way (using something like OpenCV) to detect text skew and correct it by rotating the image? Pretty much like this? Rotating an image seems easy enough if you know the angle, but for the images I’m
Continue readingHow to automatically detect and crop individual sprite bounds in sprite sheet?
Issue Given a sprite sheet like this: I would like to write an algorithm that can loop through the pixel data and determine the bounding rectangle of each discreet sprite. If we assume that for each pixel X, Y that
Continue readingHow to remove noise artifacts from an image for OCR with Python OpenCV?
Issue I have subsets of images that contains digits. Each subset is read by Tesseract for OCR. Unfortunately for some images the cropping from the original image isn’t optimal. Hence some artifacts/remains at the top and bottom of the image
Continue readingHow to find playing cards in an image with OpenCV?
Issue I’m currently developing a playing card detection program. I’m using Hough Line Transform in order to detect the positions of the cards, as it seems the most robust way. because it’s less dependent of environment conditions such as light
Continue readingHow to crop image to only text section with Python OpenCV?
Issue I want to crop the image to only extract the text sections. There are thousands of them with different sizes so I can’t hardcode coordinates. I’m trying to remove the unwanted lines on the left and on the bottom.
Continue readingHow to create CMYK halftone Images from a color image?
Issue I am working on a project that requires me to separate out each color in a CYMK image and generate a halftone image that will be printed on a special halftone printer. The method used is analogues to silk
Continue readingHow to detect and extract signature from an image with OpenCV?
Issue I am importing the attached image. After importing the image, I want to remove horizontal lines, detect the signature and then extract it, create rectangle around signature, crop the rectangle and save it. I am struggling to identify entire
Continue readingHow to remove non-straight diagonal lines from text image OpenCV?
Issue I have an image containing text but with non straight lines drawn on it. I want to remove those lines without affecting/removing anything from the text. For that I used Hough probabilistic transform: import cv2 import numpy as np
Continue readingHow to remove all lines from an image? (horizontal, vertical, diagonal)
Issue I need to remove the lines in an image, which is a table eventually. I have found a way to remove the horizontal and vertical lines: convert 1.jpg -type Grayscale -negate -define morphology:compose=darken -morphology Thinning ‘Rectangle:1×80+0+0<‘ -negate out.jpg The
Continue readingRecognizing digits with OpenCV and Python (Simple digit OCR)
Issue So I’m trying to create a program that can see what number an image is and print the integer in the console. (I’m using python 3) For example that the program recognizes that the following image (an actual image
Continue readingHow to calculate the area of a shape in an image with Python OpenCV?
Issue I would like to calculate the area of a shape in an image produced from infra red cameras. I have a large set of matrices which i produce from an infra- red camera. In each matrix/image i have mostly
Continue readingHow to extract words from left to right in an image with OpenCV Pytesseract?
Issue I am working on a contract sheet with OpenCV and pytesseract. I want to extract words from this image I am trying with getStructureElement but my code jumps on the next line in the center of the image. I’m
Continue readingtransforming img to gray error, tuple out of range
Issue I am using this function that I found on the web, its add_speckle() function for adding speckle noise to images : def add_speckle(k,theta,img): gauss = np.random.gamma(k,theta,img.size) gauss = gauss.reshape(img.shape[0],img.shape[1],img.shape[2]).astype(‘uint8’) noise = img + img * gauss also am using
Continue readingConverting Image from RGBA to RGB reveals padding, how to crop that?
Issue I’m trying to convert an image from RGBA to RGB. But the conversion to RGB is adding padding to the image. How can I convert without the padding? Or how can I remove it? img = Image.open(‘path.png’) img.save("img.png") rgb_im
Continue readingFinding Duplicate image files
Issue I have around 1 TB of images, stored in my hard disk. These are pictures taken over time of friends and family. Many of these pictures are duplicates, in the sense, same file saved in different locations, probably with
Continue readingBrighten only dark areas of image in python
Issue I am trying to process images and I would like to brighten the dark areas of my image. I tried Histogram Equalization, however as there are also some bright areas in the image, the result is not satisfying. This
Continue readingExtract colors from image using python
Issue I have a black and white image and the same image with color strokes. What I want to do is extract the color strokes, blur them and then blend original with the blurred image. I extract the color strokes
Continue readingFast screenshot of a small part of the screen in Python
Issue I am currently working on a project where I need to take a 30×40 pixels screenshot from a specific area of my screen. This is not very hard to do as there are plenty of methods that do that.
Continue readingFast screenshot of a small part of the screen in Python
Issue I am currently working on a project where I need to take a 30×40 pixels screenshot from a specific area of my screen. This is not very hard to do as there are plenty of methods that do that.
Continue readingHow to reduce the number of colors in an image with OpenCV?
Issue I have a set of image files, and I want to reduce the number of colors of them to 64. How can I do this with OpenCV? I need this so I can work with a 64-sized image histogram.
Continue readingHow to get an image char array by using libpng?
Issue Although I have successfully utilized stb_image/CImg/lodepng open source to get a char array, the memory usage is too huge that I can’t implement it in a low power embedded system. Therefore, I try to use libpng to read a
Continue readingZero padding fourier of image
Issue I’m trying to solve a question, given an image f(x,y) at size N,M with fourier transform F. we define function g, which its fourier transform G is define as follows: G(x,y)=F(x,y) if x which means that we pad the
Continue readingconverting bmp to 2d matrix messing up colors
Issue I’m trying to create a 2d array that contains RGB value for each pixel in the image, I created a copy of the original image to check out if the images are similar and I got that the output
Continue readingPIL jpeg, how to preserve the pixel color
Issue I have some experiments with JPEG, the doc said “100 completely disables the JPEG quantization stage.” However, I still got some pixel modification during saving. Here is my code: import Image red = [20,30,40,50,60,70]; img = Image.new(“RGB”, [1, len(red)],
Continue readingHow to Apply Mask to Image in OpenCV?
Issue I want to apply a binary mask to a color image. Please provide a basic code example with proper explanation of how the code works. Also, is there some option to apply a mask permanently so all functions operate
Continue readingHow to straight an image by selecting four points in an Image?
Issue I want to straight an image by selecting four points in the image using getPerspectiveTransform() method of opencv in java. I know it can be done using with opencv in python: getPerspectiveTransform. If anyone used this to achieve image
Continue readingUnderstanding contour hierarchies: How to distinguish filled circle/contour and unfilled circle/contour in OpenCV?
Issue I am unable to differentiate between the below two contours. cv2.contourArea() is giving the same value for both. Is there any function to distinguish them in Python? How do I use contour hierarchies to determine the difference? Solution To
Continue readingunable to load the haarcascadeshaarcascade.xml in opencv
Issue Im trying face detection using opencv in android but I unable to load the object detection xml files. The code is as follows, ….. static CvHaarClassifierCascade* cascade = 0; CvMemStorage* storage = 0; LOGI(“before haarcascade”); if (!cascade) { const
Continue readingOpenCV Python how to keep one color as is converting an image to Grayscale
Issue How do I make it so everything in the image is in gray-scale except the orange cone. Using opencv python. Solution You can achieve your goal by using bitwise_and() function and thresholding. Steps: generate mask for the required region.(here
Continue readinghow to make the blur effect with react-native?
Issue how to make the blur effect with react-native ? like ‘background-image’ and i want to switch the effect ‘blur’ and ‘none’,’none’ means no blur effect Solution Now you can do this without any library using the prop: blurRadius. E.g
Continue readinglocal histogram equalization in matlab / python
Issue i am very new in matlab. i want to write the code for local histogram equalization . i have been written code for global histogram equalization and i know that local equalization means do equalization for each part of
Continue readingKeyError: '1' when creating a list of training data
Issue i have a list of image as my dataset in trainpath folder. Under the trainpath folder, there is 2 folders, named by the class names (0 and 1). And under each folder, there is images data. And i try
Continue readingAdding borders to an image using python
Issue I have a large number of images of a fixed size (say 500*500). I want to write a python script which will resize them to a fixed size (say 800*800) but will keep the original image at the center
Continue readingHow to match physical slab dimensions to image dimensions
Issue I need to know how to approach about dimension conversion. I have some physical slabs. I’m taking pictures of them and getting few coordinates of special pixels. Up to here everything seem well. The point is I want to
Continue readingUsing LibRaw to correctly decode CR2 image?
Issue My eventual goal is to decode CR2 images from multiple cameras for display in a desktop gui. Using the LibRaw image decoding library, I’ve used the sample project to attempt to decode a CR2 image into a .TIFF file.
Continue readingnativescript image-picker not working
Issue I’m using the plugin image-picker for nativescript and I copied the example code to see how it works and to adapt it to my code. But the code doesn’t work. When I tap the button it’s supposed that the
Continue readingCopy Excel range as picture to Outlook mail under text in body
Issue I would like to copy a range from protected Excel sheet and paste it into Outlook as a picture. My code is pasting the text then the picture, but at the same time deleting the text. How can I
Continue readingDummy img src without browser warnings
Issue I have constructed a lightbox for my website. For the purposes of this question, it consists of an img element, that is hidden by default using CSS. When a thumbnail image on my site is clicked, the src of
Continue readingStyling Navigation bar with logo and button
Issue I have been trying for hours to style my navigation bar(which is horizontal at the top of the screen) so that my logo will show at left , menu on the center and the username with the logout button
Continue readingMaking all photos square via css
Issue I’m trying to make a series of photos into square photos. They may be rectangular horizontally (i.e. 600×400) or vertically (400×600), but I want to get them to be 175×175 either way. My thought was to max-height or max-width
Continue readingHow to vertically align an image inside a div
Issue How can you align an image inside of a containing div? Example In my example, I need to vertically center the <img> in the <div> with class ="frame": <div class="frame" style="height: 25px;"> <img src="http://jsfiddle.net/img/logo.png" /> </div> .frame‘s height is
Continue reading