feature-extraction

Matlab implementation of Haar feature extraction

﹥>﹥吖頭↗ 提交于 2019-12-21 05:23:18
问题 Does anyone know of a (purely) matlab implementation of Haar feature extraction (the kind used in Viola&Jones object detection algorithm)? (I ran across a matlab binding to Opencv's implementation but this is not what I am looking for) 回答1: I came across this code published as part of a Google Summer of Code 2007 project under GNU GPLv2 license. Face detection for F-spot Note that I haven't tested it myself, just thought it could be useful for you.. 来源: https://stackoverflow.com/questions

Confusion in different HOG codes

房东的猫 提交于 2019-12-19 21:22:12
问题 I have downloaded three different HoG codes. using the image of 64x128 1) using the matlab function: extractHOGFeatures , [hog, vis] = extractHOGFeatures(img,'CellSize',[8 8]); The size of hog is 3780. How to calculate: HOG feature length, N, is based on the image size and the function parameter values. N = prod([BlocksPerImage, BlockSize, NumBins]) BlocksPerImage = floor((size(I)./CellSize – BlockSize)./(BlockSize – BlockOverlap) + 1) 2) the second HOG function is downloaded from here. Same

How are HoG features represented graphically?

主宰稳场 提交于 2019-12-18 10:36:06
问题 I'm implementing the Histogram of Oriented Gradient features from "Histograms of oriented gradients for human detection" and I'd like to visualise the result. All papers on these features use a standard visualisation, but I can't find any description of how these are generated. I'd be grateful for an explanation or helpful link. 回答1: The visualizations you see in papers can be interpreted as follows: The descriptor is made up of M*N cells covering the image window in a grid. Each cell is

Issue with OneHotEncoder for categorical features

强颜欢笑 提交于 2019-12-17 15:53:43
问题 I want to encode 3 categorical features out of 10 features in my datasets. I use preprocessing from sklearn.preprocessing to do so as the following: from sklearn import preprocessing cat_features = ['color', 'director_name', 'actor_2_name'] enc = preprocessing.OneHotEncoder(categorical_features=cat_features) enc.fit(dataset.values) However, I couldn't proceed as I am getting this error: array = np.array(array, dtype=dtype, order=order, copy=copy) ValueError: could not convert string to float:

From featurers to words python (“reverse” bag of words)

给你一囗甜甜゛ 提交于 2019-12-14 03:50:06
问题 Using sklearn I've created a BOW with 200 features in Python, which are easily extracted. But, how can I reverse it? That is, go from a vector with 200 0's or 1's to the corresponding words? Since the vocabulary is a dictionary, thus not ordered, I am not sure which word each element in the feature list corresponds to. Also, if the first element in my 200 dimensional vector corresponds to the first word in the dictionary, how do I then extract a word from the dictionary via index? The BOW is

How to apply ransac on segments and plotting them

帅比萌擦擦* 提交于 2019-12-13 04:24:36
问题 I am trying to implement https://rd.springer.com/chapter/10.1007/978-3-319-68505-2_6 , but facing issues to filter and plot the results.I am using https://docs.opencv.org/3.4.2/d1/de0/tutorial_py_feature_homography.html to filter the matches.When i am running cv2.findHomography(sr[i], de[i], cv2.RANSAC,5.0) ,python crashes everytime. from skimage.segmentation import slic from skimage.segmentation import mark_boundaries from skimage.util import img_as_float from skimage import io import

Finding cumulative features in dataframe?

那年仲夏 提交于 2019-12-13 03:49:25
问题 I have a datframe with around 200 features and 3000 rows. These data samples are logged in different time, basically one per month, as shown in the below example in “col101”: 0 col1 (id) col2. col3 …. col100 col101 (date) … col2000 (target value) 1 001 653. 675 …. 343.3 01-02-2017. … 1 2 001 673. 432 …. 387.3 01-03-2017. … 0 3 001 679. 528 …. 401.2 01-04-2017. … 1 4 001 685 223 …. 503.4 01-05-2017. … 1 5 002 343 428 …. 432.5 01-02-2017. … 0 6 002 479. 421 …. 455.3 01-03-2017. … 0 7 … … … …. …

Leaf vein extraction in Opencv and applying in ml

旧巷老猫 提交于 2019-12-13 00:32:01
问题 I want to extract leaf veins and use them in machine learning process, but I don't know how to do it right. I've tried with sobel and get quite good results. code: Imgproc.GaussianBlur(image, image, new Size(3, 3), 0, 0); Imgproc.cvtColor(image, image, Imgproc.COLOR_BGR2GRAY); Mat Sx = new Mat(); Mat Sy = new Mat(); Mat absSx = new Mat(); Mat absSy = new Mat(); Imgproc.Sobel(image, Sx, CvType.CV_16S, 1, 0, 3, 1, 0, Imgproc.BORDER_DEFAULT); Core.convertScaleAbs(Sx, absSx); Imgproc.Sobel(image,

Extracting Shapes that meet a certain criteria from an Image

梦想的初衷 提交于 2019-12-12 18:38:37
问题 Let's say I have an image that I want to extract certain shapes from. This image has a plethora of shapes, but I'm only concerned about the shapes that are filled with diagonal lines. Such an image could look like this: Since I only care about shapes that have diagonal lines in them, I'm trying to use this image to generate one that looks like this: Currently, I'm attempting to do this with convolution. I start by convolving the image with this matrix: ] Which produces an image that looks

How to save resulted face landmark image in dlib?

喜夏-厌秋 提交于 2019-12-12 08:49:17
问题 I am using dlib's face_landmark_detection_ex.cpp which display the detected face image and all face landmarks on the original image. I want to save the original image with all 68 face face landmarks to my computer. I know it can be done by save_png and draw_rectangle function of dlib but draw_rectangle only give detected face rectangle position, along with it, I also want to draw the landmark points on the original image and save them like this : 回答1: The parameter pixel_type is used to