image-processing

How to create a transparent gradient along the edge of an image/mask image with python?

强颜欢笑 提交于 2020-06-29 03:59:24
问题 Basically I want to create of a halo effect for the image that fades to transparent. I have images of wounds (and their masks), with no background. I want to add a red gradient behind it, that way if I paste it on something it looks like the area surrounded the wound is irritated. image and mask ... Originally, I was making a radial (circle) gradient and pasted my transparent image on it, but this does not look good for my non circular images. image with circle gradient same image as above

Create Random Pixel Images in Swift

 ̄綄美尐妖づ 提交于 2020-06-29 03:51:58
问题 I want to create a random pixel generator in swift. How would I be able to create something like the below codes in swift? Java program to demonstrate creation of random pixel image import java.io.File; import java.io.IOException; import java.awt.image.BufferedImage; import javax.imageio.ImageIO; public class RandomImage { public static void main(String args[])throws IOException { // Image file dimensions int width = 640, height = 320; // Create buffered image object BufferedImage img = null;

Create Random Pixel Images in Swift

假装没事ソ 提交于 2020-06-29 03:50:24
问题 I want to create a random pixel generator in swift. How would I be able to create something like the below codes in swift? Java program to demonstrate creation of random pixel image import java.io.File; import java.io.IOException; import java.awt.image.BufferedImage; import javax.imageio.ImageIO; public class RandomImage { public static void main(String args[])throws IOException { // Image file dimensions int width = 640, height = 320; // Create buffered image object BufferedImage img = null;

Create Random Pixel Images in Swift

烂漫一生 提交于 2020-06-29 03:50:16
问题 I want to create a random pixel generator in swift. How would I be able to create something like the below codes in swift? Java program to demonstrate creation of random pixel image import java.io.File; import java.io.IOException; import java.awt.image.BufferedImage; import javax.imageio.ImageIO; public class RandomImage { public static void main(String args[])throws IOException { // Image file dimensions int width = 640, height = 320; // Create buffered image object BufferedImage img = null;

Hessian of Gaussian eigenvalues for 3D image with Python

自闭症网瘾萝莉.ら 提交于 2020-06-29 03:38:27
问题 I have a 3D image and I want to calculate the Hessian of Gaussian eigenvalues for this image. I would like to have the three eigenvalues of the Hessian approximation for each voxel. This feature seems to be something very common in image processing. Is there an existing implementation of this feature (like scipy.ndimage.laplace for laplacian calculation)? And is there one that parallels calculations? I tried to do it manually, through numpy operations but its not optimal because: I have to

JavaFX writing bmp image pixel by pixel

岁酱吖の 提交于 2020-06-29 03:37:37
问题 I have written a class to read the BMP files with all the necessary headers as stated here "http://www.ece.ualberta.ca/~elliott/ee552/studentAppNotes/2003_w/misc/bmp_file_format/bmp_file_format.htm" The class reads all the necessary headers and for the raw data, it reads them as bytes as shown below - private byte[] calcBytes(String path) throws IOException { //Get the path of the file Path file_path = Paths.get(path); //Return the byte array of the file return Files.readAllBytes(file_path);

Detect corners of grid

北城余情 提交于 2020-06-28 04:50:08
问题 I am trying to detect the corners of a grid within various pictures I have to process. Images can be skewed and some might be relatively well oriented but we cannot guarantee that all images will be like this. To determine the corners of the grid, I have tried using Hough lines but to no avail. Sometimes the Hough lines don't identify the edge of the grid and it is hard to determine which of the lines drawn belong to the edge of the grid and which of them are grid lines. I then decided to use

Crop exact document paper from image by removing black border from photos in Java/Python

六眼飞鱼酱① 提交于 2020-06-27 19:39:27
问题 I have taken some pictures of index cards but now I have the problem that the photographing was not perfect of course and there is a black border on each photo. I would like to crop the photo so that only the index card is left without a border. Online I could find a similar problem, but it was only about computer images, so you could assume that the black had RGB (0,0,0), which is not the case with me. In the middle there is also black text, which I don't want to cut out. Do you have any

Easy way to resize image in Node.js? [closed]

喜欢而已 提交于 2020-06-27 13:04:42
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 3 years ago . Improve this question After data is loaded from filesystem, which model worth to use to resize image and return to client? fs.readFile(process.env.OPENSHIFT_DATA_DIR + request.headers['filename'], function read(err, data) { var w = request.headers['w'] var h = request.headers['h']

Trying to segment characters using opencv - Ilumination problem

可紊 提交于 2020-06-26 13:37:48
问题 My code it's not detecting well binary image! LpImg = cv2.imread('/content/drive/My Drive/TESTING/Placas_detectadas/CPVL92.png') if (len(LpImg)): #check if there is at least one license image # Scales, calculates absolute values, and converts the result to 8-bit. plate_image = cv2.convertScaleAbs(LpImg[0], alpha=(255.0)) plate_image = LpImg #image_cropped # convert to grayscale and blur the image gray = cv2.cvtColor(plate_image, cv2.COLOR_BGR2GRAY) blur = cv2.GaussianBlur(gray,(7,7),0) #