feature-extraction

Heap Corruption using cv::FlannBasedMatcher and std::vector

有些话、适合烂在心里 提交于 2019-12-24 13:41:37
问题 I am developing a breast imaging features for object recognition, using FlannBasedMatcher to compute spatial histograms. Mat ComputeSpatialHistogram(Mat features, Mat vocabulary, int* region_index, int level, Ptr<DescriptorMatcher> flann_matcher) { int vocab_size = vocabulary.rows; Mat descriptor = Mat::zeros(1, vocab_size*my_pow(4, level), CV_32FC1); if (features.rows > 0) { vector<DMatch> matches; flann_matcher->match(features, matches); int word_idx, region_idx, descr_idx; for (int i = 0;

How to Merge MFCCs

心不动则不痛 提交于 2019-12-24 09:55:03
问题 I am working on extracting MFCC features from some audio files. The program I have currently extracts a series of MFCCs for each file and has a parameter of a buffer size of 1024. I saw the following in a paper: The feature vectors extracted within a second of audio data are combined by computing the mean and the variance of each feature vector element (merging). My current code uses TarsosDSP to extract the MFCCs, but I'm not sure how to split the data into "a second of audio data" in order

How to extract features from image for classification and object recognition?

↘锁芯ラ 提交于 2019-12-24 00:33:20
问题 I'm confused about the way I should make the "features extraction " method I want to use SVMs to apply "Object recognition" in images , There's a sample in Emgu's examples that holds an XML file contains the features of a cat ! and I've been trying since a week to know how they did it and what methods they used and I came across this page http://experienceopencv.blogspot.com/2011/02/learning-deformable-models-with-latent.html that displays the steps ! It's so complicated plus couldn't do it

Does it make sense to use both countvectorizer and tfidfvectorizer as feature vectors for text clustering with KMeans?

我们两清 提交于 2019-12-23 23:15:18
问题 I am trying to build out my feature vectors from my csv file which contain about 1000 comments. One of my feature vector is tfidf using scikit learn's tfidf vectorizer. Does it make sense to also use count as a feature vector or is there a better feature vector that i should use? And if i do end up using both Countvectorizer and tfidfvectorizer as my features, how should i fit them both into my Kmeans model (specifically the km.fit() part)? For now i am only able to fit the tfidf feature

Not getting what 'spatial weights' for HOG are

你离开我真会死。 提交于 2019-12-23 21:31:23
问题 I am using HOG for sunflower detection. I understand most of what HOG is doing now, but have some things that I do not understand in the final stages. (I am going through the MATLAB code from Mathworks). Let us assume we are using the Dalal-Triggs implementation. (That is, 8x8 pixels make 1 cell, 2x2 cells make 1 block, blocks are taken at 50% overlap in both directions, and lastly, that we have quantized the histograms into 9 bins, unsigned. (meaning, from 0 to 180 degrees)). Finally, our

Machine learning with multiple feature types in python

泪湿孤枕 提交于 2019-12-23 05:42:18
问题 I am able to do some simple machine learning using scikit-learn and NLTK modules in Python. But I have problems when it comes to training with multiple features that have different value types (number, list of string, yes/no, etc). In the following data, I have a word/phrase column in which I extract the information and create relevant columns (for example, the length column is the character lengths of 'word/phrase'). Label column is the label. Word/phrase Length '2-letter substring' 'First

Pybrain Text Classification: data and input

岁酱吖の 提交于 2019-12-23 02:31:38
问题 I have 3 sets of sentences (varying in word counts), but I don't know how to extract features from the text such that the input dimension will remain the same. For example, I've tried bag-of-words but, since the word-count variation causes input-dimension variation, I eventually get errors. I would much appreciate it if you could show me an approach to preparing the string data for the neural network. Thank you! (Python 2.7 in Windows 7) 回答1: How to format the input This is an extraction from

A good way to identify cars at night in a video

浪子不回头ぞ 提交于 2019-12-22 10:28:37
问题 I'm trying to identify car contours at night in a video ( Video Link is the link and you can download it from HERE ). I know that object detection based on R-CNN or YOLO can do this job. However, I want something more simple and more faster beacause all I want is to identify moving cars in real-time . (And I don't have a decent GPU.) I can do it pretty well in the day time using the background subtruction method to find the contours of cars: Because the light condition in the day time is

Determinig the number of hidden states in a Hidden Markov Model

送分小仙女□ 提交于 2019-12-21 17:29:04
问题 I am learning about Hidden Markov Models for classifying motion in a sequence of t image frames. Assume I have m dimensions of feature from each frame. Then I cluster it into a symbol (for observable symbol). And I create k different HMM model for k class. Then, how do I determine the number of hidden states for each model to optimise prediction ? Btw, is my approach correct? If I misunderstood how to use it, please correct me:) Thanks :) 回答1: "is my approach already correct?" Your current

Android AudioRecord and MediaRecorder

雨燕双飞 提交于 2019-12-21 13:06:07
问题 I'm developing an audio processing application where I need to record audio, and then process it to obtain features of that recording. However, I want the audio in a playable format to play it after with MediaPlayer. I've seen that to record audio to process it it's better to use AudioRecord, because I can get the raw audio from there. But then I can't write the data to a file in a playable format (is there any library to do this in android?). I used this method to record raw data and then