Android openCV byte[] to mat to byte[]
My goal is to add an overlay on the camera preview that will find book edges. For that, I override the onPreviewFrame where I do the following: public void onPreviewFrame(byte[] data, Camera camera) {...
View ArticleHow to write compile.sh file for facerec_fisherfaces?
On Ubuntu 14.4 with OpenCV 3.1.0 : I'm trying to compile and run this file http://docs.opencv.org/3.0-last-rst/_downloads/facerec_fisherfaces.cpp but I don't know what to write in the compile.sh file...
View ArticleRandom segfaults when checking for OpenCL
Hi, I wanted to use UMats to speed up some OpenCV calls to speed up performance, but ran into an issue when checking for OpenCL. Basically I broke everything down to this to reproduce the error:...
View ArticleErrors when predicting from a Neutral Network
Hello everyone, I am trying to train a neutral network in opencv using one hidden layer network. Everything seems fine but the program crashes when the predict function for the model is called. Below...
View ArticleHow to recast mat as const
This is probably a C++ question but I can't find it there either. I have a sparseMat that I want to recast as a const sparseMat so I can use SparseMatConstIterator. The examples are all for this and...
View Articlecan anyone recommended a machine vision camera?
What I'm looking for is: * USB (2 or 3) * 3.2MP color * global shutter is probably not required as this is not tracking moving objects * provide source code to libraries/drivers such that we can make...
View ArticleConcatenate failing check for #axes?
Using OpenCV, I am trying to classify an image. The neural network I used to train it takes in an image and hand-crafted features and late fuses them at the fully-connected layers before...
View ArticlevideoWriter - not saving properly
Hello, I am using the VideoWriter class to save my video. int vidOutExt = CV_FOURCC('M', 'J', 'P', 'G'); saving at 25 frames per second in .avi format. But I can only open the video in vlc media...
View ArticleOpenCV Android wrong front camera orientation
I'm trying to get the front camera using OpenCV 3.1 or even 2.4.11, stay with the correct orientation of the device and the image is not blurred (stretched) or have any other problem that harms the...
View ArticleDraw on face features using OpenCV
I am newbie using OpenCV and would like a step by step how to use the AAM in Android Studio. How do I create an app with these characteristics? [link 1](https://www.youtube.com/watch?v=vKmxLRmMsjk)...
View Articleerror while re-build opencv-3.1.0 with extra modules "opencv_contrib" ?
I'm using Opencv 3.1.0 on Ubuntu 14.04 after downloading opencv_contrib then moving the folder to /home/MY_NAME/opencv-3.1.0/build then type in terminal cmake...
View ArticleCamera Matrix with Extra Optical Elements
Hello, I am using a camera sensor with a fixed focal length lens that has a distortion on it. Normally I would use the OpenCV chessboard routine as is to correct for it, but in this case I have extra...
View ArticleIs OpenCV's VideoCapture.read() function skipping frames?
**The Problem** I'm writing a video tracking application (in Python) which requires me to calculate the amount of time an object has spent in a particular region of the frame. What I've done is count...
View ArticleHow to join png with alpha / transparency in a frame in realtime
I'm working under the example of OpenCV android 2.4.11 which detects faces using the camera. Instead of drawing a rectangle on the face found, I'm trying to put a mask (png image) on the face. But to...
View ArticleImage Processing Best Way - To extract Only Disease Leaf part
Hi. Using opencv, what's the better way to extract of leaf image only disease part? By color segmentation, texture, etc? For exemple: I do not want the green part of leaf (isolating), only internal...
View ArticleProject Image Plane on Object Plane
I am trying to find the coördinates of a point on my image (Xpixel, Ypixel) on a object plane... like the reverse of (cv::Projectpoints) My camera is already calibrated , so i know the : 1. intrinsic...
View ArticleSegmentation Fault When OpenCV Program run as a Video Filter Plugin for VLC
I Downloaded the OpenCV 3.1 source code and compiled it using MinGW. Make Files are generated using CMake. I also turned on the CMake_GNUtoMS option CMake so that .lib files are generated along with .a...
View ArticleHow to copy specific number of columns from a matrix to another matrix?
I know the way to copy specific rows from one matrix to another but how can I copy only a specific number of columns from one matrix to another? For example, if we have 10x10 matrix A (10 rows and 10...
View ArticleVideoWriter fails to write
The problem what i am facing is that when i try to save the image using Videowriter it creates the video file but the size is 0. I had created a header declaring a function which saves the video and a...
View Article