vision

OpenCV 3.0 Can't load neural network

时间秒杀一切 提交于 2019-11-28 13:53:27
I need to use a neural network in my OpenCV (version 3.0) project. I've created and trained neural network and it works, but if I want to load neural network from YML file, it doesn't predict. This is a code where I creat, train and save my neural network: FileStorage fs("nn.yml", FileStorage::WRITE); int input_neurons = 7; int hidden_neurons = 100; int output_neurons = 5; Ptr<TrainData> train_data = TrainData::loadFromCSV("data.csv", 10, 7, 12); Ptr<ANN_MLP> neural_network = ANN_MLP::create(); neural_network->setTrainMethod(ANN_MLP::BACKPROP); neural_network->setBackpropMomentumScale(0.1);

Is it possible to run opencv (python binding) from a virtualenv?

感情迁移 提交于 2019-11-27 19:00:50
I would like to keep everything contained within the virtualenv. Is this possible with OpenCV? I'm fine with building from scratch, do I just need to setup the virtualenv first then use special compile flags to tell it where to install to? I found the solution was that I had to copy over cv2.so and cv.py to the directory running the virtualenv, then pip install numpy. To do this on Ubuntu 12.04 I used. virtualenv virtopencv cd virtopencv cp /usr/local/lib/python2.7/dist-packages/cv* ./lib/python2.7/site-packages/ ./bin/pip install numpy source bin/activate python import cv From opencv install

Detect table with OpenCV

时光总嘲笑我的痴心妄想 提交于 2019-11-27 14:13:17
I often work with scanned papers. The papers contain tables (similar to Excel tables) which I need to type into the computer manually. To make the task worse the tables can be of different number of columns. Manually entering them into Excel is mundane to say the least. I thought I can save myself a week of work if I can put a program to OCR it. Would it be possible to detect headers text areas with the OpenCV and OCR the text behind the detected image coordinates. Can I achieve this with the help of OpenCV or do I need entirely different approach? Edit: Example table is really just a standard

mAP metric in object detection and computer vision

余生颓废 提交于 2019-11-27 09:02:38
问题 In computer vision and object detection, the common evaluation method is mAP. What is it and how is it calculated? 回答1: Quotes are from the above mentioned Zisserman paper - 4.2 Evaluation of Results (Page 11): First an "overlap criterion" is defined as an intersection-over-union greater than 0.5. (e.g. if a predicted box satisfies this criterion with respect to a ground-truth box, it is considered a detection). Then a matching is made between the GT boxes and the predicted boxes using this

OpenCV 3.0 Can't load neural network

一笑奈何 提交于 2019-11-27 07:57:31
问题 I need to use a neural network in my OpenCV (version 3.0) project. I've created and trained neural network and it works, but if I want to load neural network from YML file, it doesn't predict. This is a code where I creat, train and save my neural network: FileStorage fs("nn.yml", FileStorage::WRITE); int input_neurons = 7; int hidden_neurons = 100; int output_neurons = 5; Ptr<TrainData> train_data = TrainData::loadFromCSV("data.csv", 10, 7, 12); Ptr<ANN_MLP> neural_network = ANN_MLP::create(

Is it possible to run opencv (python binding) from a virtualenv?

柔情痞子 提交于 2019-11-26 22:45:12
问题 I would like to keep everything contained within the virtualenv. Is this possible with OpenCV? I'm fine with building from scratch, do I just need to setup the virtualenv first then use special compile flags to tell it where to install to? 回答1: I found the solution was that I had to copy over cv2.so and cv.py to the directory running the virtualenv, then pip install numpy. To do this on Ubuntu 12.04 I used. virtualenv virtopencv cd virtopencv cp /usr/local/lib/python2.7/dist-packages/cv* .

Detect table with OpenCV

跟風遠走 提交于 2019-11-26 18:22:49
问题 I often work with scanned papers. The papers contain tables (similar to Excel tables) which I need to type into the computer manually. To make the task worse the tables can be of different number of columns. Manually entering them into Excel is mundane to say the least. I thought I can save myself a week of work if I can put a program to OCR it. Would it be possible to detect headers text areas with the OpenCV and OCR the text behind the detected image coordinates. Can I achieve this with the