image-segmentation

How to load Image Masks (Labels) for Image Segmentation in Keras

喜你入骨 提交于 2019-12-04 12:00:26
问题 I am using Tensorflow as a backend to Keras and I am trying to understand how to bring in my labels for image segmentation training. I am using the LFW Parts Dataset which has both the ground truth image and the ground truth mask which looks like this * 1500 training images: As I understand the process, during training, I load both the (X) Image (Y) Mask Image Doing this in batches to meet my needs. Now my question is, is it sufficient to just load them both (Image and Mask Image) as NumPy

what are my research areas for image processing project?

霸气de小男生 提交于 2019-12-04 11:44:54
For my final year project I'm doing a vehicle detail modification system. the system should be able to these following tasks. I'm using a size image of a vehicle taken from a fixed distance lets say from 5m. and different colors and rim images are stored I'm my application, that is is the basic idea. detect the tire and the alloy rim of the vehicle detect and measure the rim size of the installed rim apply a new alloy rim to the vehicle ( embed or put the alloy rim on top of the original image haven't decided yet) change color of the vehicle body apply tint colors to the vehicle windows

Matlab - How to detect green color on image?

感情迁移 提交于 2019-12-04 11:08:56
I'm working in project that basically I have to detect the threes on image and delete the other information. I used HSV as segmentation and the function regionprops to detect each element. It works fine, but in same cases that has house roofs, they aren't deleted because the value of Hue is similar to the threes. So far, this is the result: To remove the roofs, I thought that maybe is possible detecting the color green in each region detected. If the region dont have 70% of green (for example) that region is deleted. How can I do that? How Can I detect only the green color of the image?

Identifying different coin values from an image using MATLAB

社会主义新天地 提交于 2019-12-04 10:22:10
I'm trying to identify the number of matches and coins of each value in a picture using MATLAB. Here is the starting picture, with matches and 4 different coin values. (5 small silver, 2 small gold, 2 big silver, 4 big gold coins) The output: Here's the code: close all; img = (imread('C:\Users\Torstein\Jottacloud\Skole\Visu\Prosjekt\sample_images\sample2.jpg')); img_gray = rgb2gray(img); % Filter image for easier edge detection m = 12; n = 12; img_filter = imfilter(img_gray, fspecial('average', [m n])); %figure, imshow(f), title('f') % Edge detection [~, threshold] = edge(img_filter, 'canny');

Image segmentation - Split and Merge (Quadtrees)

拜拜、爱过 提交于 2019-12-04 09:33:25
问题 Is there an implementation for the split and merge method of image segmentation? any advice would be much appreciated. 回答1: What segmentation is about? Segmentation means division of your image into several connected regions. Basically, you could do segmentation with two definitions of region: you could define a region as a group of connected similar pixels, or a set of connected pixels surrounded by discontinuities (edges). Split and merge uses the first approach. Mathematically speaking: if

OpenCV VLFeat Slic function call

Deadly 提交于 2019-12-04 08:43:28
I am trying to use the vl_slic_segment function of the VLFeat library using an input image stored in an OpenCV Mat. My code is compiling and running, but the output superpixel values do not make sense. Here is my code so far : Mat bgrUChar = imread("/pathtowherever/image.jpg"); Mat bgrFloat; bgrUChar.convertTo(bgrFloat, CV_32FC3, 1.0/255); cv::Mat labFloat; cvtColor(bgrFloat, labFloat, CV_BGR2Lab); Mat labels(labFloat.size(), CV_32SC1); vl_slic_segment(labels.ptr<vl_uint32>(),labFloat.ptr<const float>(),labFloat.cols,labFloat.rows,labFloat.channels(),30,0.1,25); I have tried not converting it

How is the smooth dice loss differentiable?

半世苍凉 提交于 2019-12-04 08:26:23
I am training a U-Net in keras by minimizing the dice_loss function that is popularly used for this problem: adapted from here and here def dsc(y_true, y_pred): smooth = 1. y_true_f = K.flatten(y_true) y_pred_f = K.flatten(y_pred) intersection = K.sum(y_true_f * y_pred_f) score = (2. * intersection + smooth) / (K.sum(y_true_f) + K.sum(y_pred_f) + smooth) return score def dice_loss(y_true, y_pred): return (1 - dsc(y_true, y_pred)) This implementation is different from the traditional dice loss because it has a smoothing term to make it "differentiable". I just don't understand how adding the

Over-segmentation of Watershed algorithm

家住魔仙堡 提交于 2019-12-04 07:08:53
I followed the 2-D Watershed example in Mathworks.com to separate the connected objects, like the image below: The code is summarize as: bw = imread('some_binary_image.tif'); D = -bwdist(~bw); D(~bw) = -Inf; L = watershed(D); The result is: The particle in the center has been separated into two. Are there any ways to avoid the over-segmentation here? Thanks, lennon310, chessboard does work well for most of my images, but there are still some cases that it doesn't. For example, the following binary image: Using chessboard will result in: As I have hundreds of images, it seems that it is

Segmenting circle-like shapes out of Binary Image

ⅰ亾dé卋堺 提交于 2019-12-04 05:27:24
I have several binary images and my task is to segment circle-like shape. The circles are not perfect rounded circle, but all of them will look like circle. Here are some example images and what I need: As you can see from above, the left images are original images, and the right images are what I need to do. The circles intersect with other shapes, but I only want the circle, as indicated in red. The imaginary lines to close the circle will be required. What can I do in this case in Image Processing? EDIT: in case, the image above is broken, here: http://imageshack.us/photo/my-images/835

How to detect a point above and below a region?

余生长醉 提交于 2019-12-04 04:47:49
问题 I have this image: Where the red dots are coordinates that divide the different letters of this Arabic word segment. I want to detect the dots above or below the areas between the dots. The dots are (from left to right) = [81,183;80,217;83,275;83,314] Now there is a dot above the letter between [81,183] and [80,217] . Similarly there are dots above section between [80,217] and [83,275] and dots below region [83,275] and [83,314] . What I want to do is suppose a dot is detected above a