opencv,ubuntu-14.04,nvidia , Point Grey Bumblebee2 firewire 1394 with Nvidia Jetson TK1 board

Point Grey Bumblebee2 firewire 1394 with Nvidia Jetson TK1 board


Tag: opencv,ubuntu-14.04,nvidia

I have successfully interfaced Point Grey Bumblebee2 firewire1394 camera with Nvida Jetson TK1 board and I get the video using Coriander and video for Linux loop back device is working as well. But when I tried to access camera using OpenCV and Coriander at the same time, I have conflicts. And when I tried to access the video from camera by closing the Coriander then I can get the video but in that case I am not able to change the mode and format of the video. Anyone can help me to resolve this problem. Can I change the video mode of the camera from OpenCV.


You will have to install the flycapture sdk for ARM if you want to do it manually (by code). The flycap UI software i dont believe works on ARM, let alone ubuntu 14.04, just ubuntu 12.04 x86. If you have access, what I usually do is plug it into my windows machine and use the Flycap software to change the configurations on the camera.

I found this question completely randomly, but coincidentally I am trying to interface the bumblebee2 with the jetson right now as well. Would you care to share as to what firewire mini-PCIe you used and how you went about any configurations (stock or grinch kernel, which L4T version) ?

Also, although not fully complete, you can view a code example as to how to interface with the camera using the flycaputre sdk here: It is a ROS driver, but you can just reference the PointGreyCamera.cpp file for examples if your not using ROS.

Hope this helps


conversion between Mat and Mat1b/Mat3b

I want to match my code into a given interface. Inside my class OperateImage in all methods I use cv::Mat format. When putting it in SubMain function which uses cv::Mat3b and returns cv::Mat1b it does not work. How can I change it so that I can use my written class?...

error using already compiled version of openCV

I've used the already compiled version of openCV for Raspberry Pi. link for anyone who is interested After trying to compile using this command line g++ test3.cpp -o test3 -I/usr/local/include/ -lraspicam -lraspicam_cv -L/opt/vc/lib -lmmal -lmmal_core -lmmal_util -I/usr/include -lopencv_core -lopencv_highgui -lopencv_imgproc -lwiringPi -lpthread I get the following error lines. //usr/local/lib/ undefined...

Extracting polygon given coordinates from an image using OpenCV

I've a set of points like the following: <data:polygon> <data:point x="542" y="107"/> <data:point x="562" y="102"/> <data:point x="582" y="110"/> <data:point x="598" y="142"/> <data:point x="600" y="192"/> <data:point x="601" y="225"/> <data:point x="592" y="261"/> <data:point x="572" y="263"/> <data:point x="551" y="245"/> <data:point x="526" y="220"/> <data:point x="520" y="188"/> <data:point x="518" y="152"/> <data:point x="525" y="127"/> <data:point...

OpenCV & Python: quickly superimpose mask over image without overflow

I'd like to superimpose a binary mask over a color image, such that where the mask is "on", the pixel value changes by an amount that I can set. The result should look like this: I am using OpenCV 2.4 and Python 2.7.6. I have a way that works well,...

Android edit images on the fly

It seems that in Android there are no "easy" libraries for editing and save pictures, neither free or with licenses). Aviary is no longer available. I have to implement an app for Taking picture, edite with some effects on the fly (Vignetting contrast, brightness...), add some text and save. A...

Creating a 25fps slow motion video from a 100fps GoPro .mp4 video with C++/OpenCV

I have a 100fps .mp4 GoPro video and I want to create from it a slow Motion one with 25fps. I'm trying since two days but to no avail. I could play the video, save a video from the GoPro's WiFi stream, but when I try to read the 100fps...

how to use SIFT features for bag of words in opencv?

I have read a lot of articles about implementing bag of words after taking sift features of an image, but I'm still confused what to do next. What do i specifically do? Thank you so much in advance for the guidance. This is the code that i have so far....

Must compile Opencv with Mingw in order to use in QT under Winodws?

I've visit these blogs How to link opencv in QtCreator and use Qt library All of them are using Mingw to compile Opencv through Cmake. If I want to use Opencv in QT, is compiling with Mingw the only way? I have this question because I already compiled...

How to create thumbnails using opencv-python?

I'm trying to downsample my image(using anti-aliasing) using Python-Pillow's im.thumbnail() method. My code looks like: MAXSIZE = 1024 im.thumbnail(MAXSIZE, Image.ANTIALIAS) Can you tell me some alternative in opencv-python to perform this re-sizing operation ?...

Flyweight pattern - Memory footprint

I'm learning Python and I've thought it would be a nice excuse to refresh my pattern knowledge and in that case, the Flyweight pattern. I created two small programs, one that is not optimized and one is implementing the Flyweight pattern. For my tests purposes, I'm creating an army of...

java.lang.NoClassDefFoundError: org/opencv/core/Core - Java Servlet + OpenCV

I am trying to use opencv 2.4.9. in a Java Servlet with NetBeans, i have two files - the first one is a Servlet java file which is called by index.html , and the second one is a java file with all the opencv imports but this file...

OpenCV - Method 'knnMatch' could not be resolved

I have just a little problem with the right resource. I am using opencv 2.4.8 and I couldn't find the right resource for knnMatch(). I tried the following which didn't work: #include "opencv2/core/core.hpp" #include <opencv2/nonfree/features2d.hpp> #include "opencv2/nonfree/nonfree.hpp" #include <opencv2/ml/ml.hpp> //#include "opencv2/features2d/features2d.hpp" //#include <opencv2/legacy/legacy.hpp> Can someone say me the right resource?...

Camera calibration and conversion of coordinates(OpenCV)

I am trying to map the 2D pixel coordinates in an image to real world 3D coordinates with respect to a fixed webcam. The calibration tutorial on the OpenCV page ( has given me the following xml file: <?xml version="1.0"?> <opencv_storage> <calibration_Time>"Wed Jun 17 12:02:01 2015"</calibration_Time> <nrOfFrames>25</nrOfFrames> <image_Width>640</image_Width> <image_Height>480</image_Height>...

opencv after install characters look awkward [duplicate]

This question already has an answer here: opencv :: Multiple unwanted window with Garbage name 2 answers Good day I installed VS2013 on windows 8.1 x64 I was trying to install opencv and i had alot of problems the final error LNK1112: module machine type 'X86' conflicts with target...

What is version of cuda for nvidia 304.125

I am using ubuntu 14.04. I want to install CUDA. But I don't know which version is good for my laptop. I trace my drive that is $cat /proc/driver/nvidia/version NVRM version: NVIDIA UNIX x86_64 Kernel Module 304.125 Mon Dec 1 19:58:28 PST 2014 GCC version: gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1)...

Error : Cmake can't generate openCV

I am trying to instal opencv C++ with codeBlocks in Windows 8 by following this but I am blocked in step 4.when I try to generate Cmake I have this Error : CMake Error: CMake was unable to find a build program corresponding to "MinGW Makefiles". CMAKE_MAKE_PROGRAM is not...

Python and conflicting module names

It seems that if a file is called and it imports scipy.ndimage, the latter somehow ends up failing to find its own submodule, also called io: $ echo "import scipy.ndimage" > $ python Traceback (most recent call last): File "", line 1, in <module> import scipy.ndimage File...

opencv window not refreshing at mouse callback

I am trying to draw with mouse move in an opencv window. But when I draw, nothing draws on the window. When I try to close the window from the cross in the topleft(ubuntu), it opens a new window which it should be as I haven't pressed escape, and in...

best way to create a mat from a CIImage?

I am using CIDetector to detect faces, then using OpenCV on the lower half of each face to detect the size of any smiles. I am using the below code to create the cv::mat which OpenCV can perform the detection on, as you can see the image goes through the...

issues with installing newer cabal version for haskell vim now

I would like to install this vim plugin: When trying to run the suggested installation script: curl -o - | bash I get: --- Cabal version 1.18 or later is required. Aborting. I then try to install a newer version of cabal: [email protected]:~/Downloads/cabal-install-$ ./ The response I get:...

Detecting face using haar-like cascade in opencv using c++

I have been trying to execute the below code but couldn't compile it.I searched for error by masking some lines as comments.Finally I reached CascadeClassifier face_cascade;by removing all the other lines from face_cascade.load to rectangle(image,faces[i],Scalar(0,125,165),2,8,0); But I couldn't understand what the error is!Did I declare CascadeClassiier in a wrong way?...

Using OpenCV in Swift iOS

After adding the OpenCV 2 framework in my xcode project, I tried searching for samlpes or tutorials for integration with swift. Are there any good tutorials for the same?...

Strange behavior of psutil

I'm using the library psutil for python 2.7. Consider this small program : import os import psutil # return the memory usage in MB process = psutil.Process(os.getpid()) print process.get_memory_info()[0] / float(2 ** 20) The memory informations returned by the program are always different. I can't understand how my application, doing...

Is there a way to prevent rounding in opencv matrix divison

I have an integer matrix and I want to perform an integer division on it. But opencv always rounds the result. I know I can divide each element manually but I want to know is there a better way for this or not? Mat c = (Mat_ <int> (1,3) <<...

OpenCV Save a Mat as Binary (1-bit depth) TIFF

Suppose we have a Mat after applying the OpenCv's Imgproc.adaptiveThreshold: Mat srcImage = ...; Mat binaryImage = new Mat(); Imgproc.adaptiveThreshold(srcImage, binaryImage, 255, Imgproc.ADAPTIVE_THRESH_GAUSSIAN_C, Imgproc.THRESH_BINARY, THRESHOLD_BLOCK_SIZE, 10); When I save the binaryImage using Highgui.imwrite: boolean isOk = Highgui.imwrite("sample.tiff", binaryImage); Everything is ok except that output TIFF is not actually a binary...

adaptive thresholding ---ValueError: too many values to unpack

I'm pretty amateur at image processing. I could successfully do normal thresholding but however I'm facing an error in Adaptive Thresholding. Here is my code: import cv2 import numpy as np img = cv2.imread("vehicle004.jpg") img = cv2.medianBlur(img,5) gray = cv2.cvtColor(img,cv2.COLOR_BGR2GRAY) _,th2=cv2.adaptiveThreshold(gray,255,cv2.ADAPTIVE_THRESH_MEAN_C,cv2.THRESH_BINARY,11,2) cv2.imshow("window2",th2) cv2.waitKey(0) cv2.destroyAllWindows() Error Message: line 7, in <module>...

Error for cv::FileStorage in JNI

I am getting errors while compiling my native.cpp file in Eclipse ADT/NDK. While compiling the following lines of code FileStorage storage(nativepath, FileStorage::WRITE); storage << "img" << mat; storage.release(); The errors are D:/androidworkspace/Augmented-Reality//obj/local/arm64-v8a/objs/ndksetup/native.o: In function Java_com_shahrukh_AugmentedReality_CAMShiftDetection_savemat(_JNIEnv*, _jobject*, long long, _jstring*)': D:\androidworkspace\Augmented-Reality/jni/native.cpp:14: undefined reference...

OpenCV FAST corner detection SSE implementation walkthrough

Could someone help me understanding the SSE implementation of the FAST corner detection in OpenCV? I understand the algorithm but not the implementation. Could somebody walk me through the code? The code is long, so thank you in advance. I am using OpenCV 2.4.11 and the code goes like this:...

Sending live video frame over network in python opencv

I'm trying to send live video frame that I catch with my camera to a server and process them. I'm usig opencv for image processing and python for the language. Here is my code import cv2 import numpy as np import socket import sys import pickle cap=cv2.VideoCapture(0) clientsocket=socket.socket(socket.AF_INET,socket.SOCK_STREAM) clientsocket.connect(('localhost',8089))... command not found

I have installed hadoop 2.7.0. on Ubuntu 14.04. But the code is not working. when I run this code It returns command not found. The, , and are in the sbin directory. I have installed and set the paths of java and hadoop correctly....

Visual Studio 2013 LINK : fatal error LNK1181: cannot open input file

I am using Visual Studio 2013. I'm trying to build some code given to me from my professor and I keep getting this error: LINK : fatal error LNK1181: cannot open input file 'C:\Users\manduchi\Documents\eyegaze\EyeGazeDemo..\Libraries\OpenCV\lib\opencv_core249.lib' However, on my computer opencv_core249.lib is located somewhere else. I've tried updating the linker directories to...

OpenCV 2.4.3 Download [on hold]

Looking to learn OpenCV with C++, but all the tutorials I've found on youtube are with CV 2.4.3. On OpenCV's website, there is no 2.4.3 download link. Does anyone know why, or where I can find an alternative? Thanks...

Camera Calibration with OpenCV: Using the distortion and rotation-translation matrix

I am reading the following documentation: I have managed to successfully calibrate the camera obtaining the camera matrix and the distortion matrix. I had two sub-questions: 1) How do I use the distortion matrix as I don't know 'r'? 2) For all the views I have the rotation and...

Error while installing deepdish

I'm trying to create an LMDB database file to be used with Caffe according to this tutorial on an Ubuntu 14.04 machine using Anaconda Python 2.7.9. However, when I do pip install deepdish, I'm getting the following error: Collecting deepdish Using cached deepdish-0.1.4.tar.gz Complete output from command python egg_info:...

How to call OpenCV's MatchTemplate method from C#

I'm trying to get the template's position on the image using OpenCVSharp library from NuGet. Here is the code I've wrote: var image = Cv.LoadImage("Image.png"); var template = Cv.LoadImage("Template.png"); var w = (image.Width - template.Width) + 1; var h = (image.Height - template.Height) + 1; IplImage result = new IplImage(w,...

Error execute unrecognized vm option 'MaxPermSize=350m' on Ubuntu 14.04

Error to Execute/Install on Ubuntu: [email protected]:~$ cd android-studio/bin [email protected]:~/android-studio/bin$ ./ Unrecognized VM option 'MaxPermSize=350m' Error: Could not create the Java Virtual Machine. Error: A fatal exception has occurred. Program will exit. And with some knowledge after searching on search engines, I open the studio.vmoptions file in edit mode and...

When converting mkv to mp4, the audio is lost

I have converted my .mkv file into an .mp4 by using the command: sudo avconv -i input.mkv -codec copy output.mp4 I am trying to play the mp4 file in the browser, but the audio is not playing. The video player shows that it is on mute, but the button is...

Extracting Points from Lines using OpenCV

I am trying to extract points from a line on an image using openCV in C++ Language. The line is programmed to display on the image, but I need to know how do you extract points from line and input it into a text file?

c++ read in image set with different file names without hardcoding

Is there any way of reading in a set of images from file that all have varying names to each other, i.e. no continuity at all? So if you had 4 images in the same folder with the file names of: head.jpg shoulders.png knees.tiff toes.bmp Without hard coding the file...

Sending a Mat object over socket from Java to Java

I understand Sockets over Java and sending Int,String,bytes etc over it. What i just want to know is that is there a way to decode a Mat object to byte array and then send it over java socket and then retrieve back the Mat object from the byte received? Till...

What's the fastest way to compare point elements with each other´╝čI have used Nested for loop to do that, but it's very slow

I want to find the points which the distant between points less than 3.For example, some points as follow, (220,221)(220,119)(220,220)(20,90)(220,222). I use (220,221) to find points.Then i can get (220,221)(220,119)(220,220)(220,222) I use (220,119) to find points.Then i can get (220,221)(220,119)(220,220) I have used Nested for loop to do that, but...

Dividing main function into other functions in opencv using c++

I am learning opencv using c++. As I don't have any background knowledge in c++.I am learning it parallel with opencv. Here is my doubt.My main program is very big.So,I want to divide it into small functions and call them whenever necessary in a loop using conditional statements.I have searched...

opencv convertTo not working

I know this question has been asked and answered by others. But I still can't not solve my question. I read a frame from a video, which has format unsigned char (CV_8U). I hope to convert it to double precision(CV_64F). I do as following: VideoCapture capture(fileName); Mat image; capture >>...

solvePnP: Obtaining the rotation translation matrix

I am trying to image coordinates to 3D coordinates. Using the solvePnP function (in C++)has given me 3X1 rotation matrix and 3X1 translation matrix. But isn't the [R|t] matrix supposed to be 3X4? Any help will be greatly appreciated!...

OpenCV / Image Processing techniques to find the centers of bright spots in an image

I'm currently doing a project based on the methodology described in this paper: Camera calibration from a single night sky image As a beginner in computer vision, I do not quite understand how I can implement the method used in the paper to find the centre of all the bright...

Fastest way to copy some rows from one matrix to another in OpenCV

I have a [32678 x 10] matrix (w2c) and I want to copy 24700 rows of it to another matrix(out). I have the index of the rows to be copied in a vector(index). For doing this in matlab I do: out = w2c(index_im,:); It takes approximately 0.002622 seconds. In OpenCV:...

Surface normal on depth image

How to estimate the surface normal of point I(i,j) on a depth image (pixel value in mm) without using Point Cloud Library(PCL)? I've gone through (1), (2), and (3) but I'm looking for a simple estimation of surface normal on each pixel with C++ standard library or openCV. ...

OpenCV - Detection of moving object C++

I am working on Traffic Surveillance System an OpenCv project, I need to detect moving cars and people. I am using background subtraction method to detect moving objects and thus drawing counters. I have a problem : When two car are moving on road closely them my system detects it...

Bandpass Filter in Python for Image Processing

I have a noisy dataset (a stack of images) which films dim particles moving about some really bright artefacts (which are immobilized). I would like to somehow remove the immobilized artefacts from the images by applying some sort of bandpass filter wherein only pixels within a specific range are converted...

How to create rotated rectangular or polygonal ROI/mask?

Let's say i have the following image: And my region of interest looks like this: And i want to have the following result: How can i achieve this knowing that the ROI is denoted by four points: Point pt1(129,9); Point pt2(284,108); Point pt3(223,205); Point pt4(67,106); ...