image-segmentation

Sharpen the edges

醉酒当歌 提交于 2019-12-06 22:57:26
I am trying to detect the biggest/larger rectangular shape and draw bounding box to the detected area. I have tried different way to detect perfect edge ( Edges with no holes) for contour detection. I searched on stackoverflow and the solution proposed OpenCV sharpen the edges (edges with no holes) and Segmentation Edges did not work with my sample image. I would like to detect biggest/larger rectangular shape on the following two images Original Image 1 and Original Image 2 Below is the code that i use to preprocess the image before calling findcontour. public Mat processGrayScaleImage(Mat

IoU for semantic segmentation implementation in python/caffe per class

巧了我就是萌 提交于 2019-12-06 22:26:40
Is there any recommendable per class IoU(intersection over union) per pixel accuracy(different from bounding box) implementation.I am using caffe and managed to get the mean IoU but i am having difficulty in doing IoU for per class accuracy.I would appreciate a lot if someone could point out a good implementation in any language so far this the only close semantic segmentation with multiple pixel label i ve seen so far here 来源: https://stackoverflow.com/questions/44041096/iou-for-semantic-segmentation-implementation-in-python-caffe-per-class

Detect all branches in a plant picture

不打扰是莪最后的温柔 提交于 2019-12-06 20:14:54
问题 I would like to know of something that will detect all the green branches from the following image Currently i am starting with applying the Frangi filter options=struct('FrangiScaleRange', [5 5], 'FrangiScaleRatio', 1, 'FrangiBetaOne', 1,... 'FrangiBetaTwo', 7, 'verbose',true,'BlackWhite',true); [outIm,whatScale,Direction] = FrangiFilter2D(double(img), options); The output of Frangi filter is as follows This is followed by Hough Transform to detect all the lines [H,theta,rho] = hough(outIm,

Opencv import highgui in android studio is showing error.Cannot resolve(I added the library still the error remain)

可紊 提交于 2019-12-06 19:31:44
问题 I have the following code which is for image segmentation using grabcut opencv. I am using opencv for the first time. I added the opencv library. While others worked perfectly highgui is still showing cannot resolve symbol.Do i need to add something else. ( If you can help me with the code too, will be an additional help ) Here is the code: Edit : I have posted the updated code: package com.example.android.seg; import android.support.v7.app.ActionBarActivity; import android.os.Bundle; import

about detecting iris and pupil circles using hough circle in java opencv

放肆的年华 提交于 2019-12-06 15:16:14
问题 I'm using opencv in Java to try to detect circles (iris, and pupil) in images with eyes, but I didn't get the expected results. Here is my code // convert source image to gray org.opencv.imgproc.Imgproc.cvtColor(mRgba, imgCny, Imgproc.COLOR_BGR2GRAY); //fliter org.opencv.imgproc.Imgproc.blur(imgCny, imgCny, new Size(3, 3)); //apply canny org.opencv.imgproc.Imgproc.Canny(imgCny, imgCny, 10, 30); //apply Hough circle Mat circles = new Mat(); Point pt; org.opencv.imgproc.Imgproc.HoughCircles

How to implement a conditional random field based energy function from images?

爷,独闯天下 提交于 2019-12-06 12:43:14
问题 I am trying to implement some segmentation tool for my images, and I am trying to use conditional random field (CRF) based method. For example, in this paper. The standard CRF energy function includes two parts, i.e., a unary potential and a pairwise potential where L are the class labels and X are the observations (image pixels). I have got some training image with labels of the objects in the image. For example, I have got the ground truth segmentation of the objects in the image with

what is the meaning and use of class member class_id of class cv::KeyPoint in opencv?

孤街醉人 提交于 2019-12-06 11:58:31
问题 In reference manual of OpenCV 2.4.3 KeyPoint::class_id is described as "object id that can be used to clustered keypoints by an object they belong to". Due to lack of my adequate knowledge about 'keypoint' I can't understand whats the purpose of class_id . My another question is, by using feature detector, descriptor and matcher we can detect matching keypoints of a query object in a training image. But how can segment out the query object in the training image. Can we use grabcut or

Extract Image Segmentation Map from Tensorflow DeepLab v3 Demo

▼魔方 西西 提交于 2019-12-06 10:41:09
I have set up the Google's DeepLab V3 Demo on my local system and it runs successfully after making some minor changes. It's as: # -*- coding: utf-8 -*- # DeepLab Demo # This demo will demostrate the steps to run deeplab semantic segmentation model on sample input images. import os from io import BytesIO import tarfile import tempfile from six.moves import urllib from matplotlib import gridspec from matplotlib import pyplot as plt import numpy as np from PIL import Image import tensorflow as tf class DeepLabModel(object): """Class to load deeplab model and run inference.""" INPUT_TENSOR_NAME =

Matlab - How to detect green color on image?

旧街凉风 提交于 2019-12-06 06:11:22
问题 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

Autonomous seam detection in Images on matlab

女生的网名这么多〃 提交于 2019-12-06 04:12:04
问题 I'm trying to detect seams in welding images for an autonomous welding process. I want to find pixel positions of the detected line (the red line in the desired image) in the original image. I used the following code and finally removed noise from the image to reach the result below. clc,clear,clf; im = imread('https://i.stack.imgur.com/UJcKA.png'); imshow(im);title('Original image'); pause(0.5); sim = edge(im, 'sobel'); imshow(sim);title('after Sobel'); pause(0.5); mask = im > 5; se = strel(