Ask Your Question

Geppertm's profile - activity

2020-02-05 08:41:11 -0600 received badge  Popular Question (source)
2015-12-29 20:13:41 -0600 received badge  Nice Answer (source)
2014-11-06 10:06:10 -0600 received badge  Nice Answer (source)
2014-09-03 05:12:21 -0600 received badge  Necromancer (source)
2014-02-03 04:22:12 -0600 answered a question Don't capture frames of the camera???

You´ve got to use uEye-Lib to grab an Image. After that you can create a Mat with the width,highth and deepth of the grabed Image, then copy the Data from the Image to the Mat.

2014-01-28 04:34:55 -0600 answered a question Fully manual web-cam?

There are several models from econ systems which are uvc compliant. The 5-MP USB Cam gives you the full control using UVC. The USB 3.0 Models bring there own library to control them. http://www.e-consystems.com/default-de.asp

2013-12-14 01:22:45 -0600 received badge  Necromancer (source)
2013-12-14 01:22:45 -0600 received badge  Self-Learner (source)
2013-12-13 03:24:54 -0600 commented answer has anyone used a 8 megapixel camera with opencv

Great news, pleace keep me uptodate.

2013-12-13 03:22:29 -0600 commented answer Change focus of a V4l2 Cam

Hi, I´ve made a 7z File with the changes, you can find it here: http://www.altdorfer-jungs.de/2014/opencv.7z

the main changes are in cap_libv4l.cpp.

2013-12-12 03:01:13 -0600 commented answer has anyone used a 8 megapixel camera with opencv

I think the best way would be to make a Function which set´s this value in v4l2. So the lib would be compatible to older source which also has such a Limit.

2013-12-11 10:22:04 -0600 received badge  Good Answer (source)
2013-12-11 09:42:22 -0600 commented answer has anyone used a 8 megapixel camera with opencv

Unfortunatly, i don´t know where to upload my changes or add a bug for v4l.

2013-12-11 09:37:30 -0600 commented answer has anyone used a 8 megapixel camera with opencv

It´s a "Bug" of video4Linux not openCV.

2013-12-11 08:21:21 -0600 received badge  Nice Answer (source)
2013-12-11 04:56:28 -0600 answered a question has anyone used a 8 megapixel camera with opencv

Hi, Yes I´m doing this. I´m using a 8MP USB3 Cam with Ubuntu 12.04.

You have to Edit the source of lib v4l. The problem ist the call of v4l2_read_and_convert(,..,..., int maxsize). There is a defined max size (16777216), if you change this to > 23970816 it will work.

I´m sorry that i actually couldn´t give you the File where to edit the value.

2013-11-27 02:02:54 -0600 answered a question controlling the system

C/C++ Ubuntu:

system("shutdown 0");

C/C++ Windows

system("shutdown -f");
2013-11-12 06:39:07 -0600 answered a question Why are the results of RNG same every time?

The Problem is that your are initializing RNG always with the same value. Try this:

#include <time.h>
.
.

void initializeAnts( SingleAnt *ants, Mat *sourceImage )
{
    uint64 initValue = time(0);
    RNG rng( initValue );
    int imgWidth = sourceImage->cols;
    int imgHight = sourceImage->rows;

    for( int index = 0; index < ANTSNUMBER; index++ ) {
        ants[ index ].col = rng.uniform( 0, imgWidth );
        ants[ index ].row = rng.uniform( 0, imgHight );
    }
}

This should give you different random values.

2013-11-06 09:39:30 -0600 answered a question Change focus of a V4l2 Cam

I´ve found out that this feature isn´t implemented for Linux. I´ve implemented the features. I´m going to commit this features as soon as possible.

2013-11-06 06:44:19 -0600 received badge  Student (source)
2013-11-06 06:19:37 -0600 answered a question stack of images tif with C++ & OpenCV

I think you have to load the tif file into a char(or byte) array.(buf) Then use Mat imdecode(InputArray buf, int flags) Then you will get the size of the first image out of the returnend Mat. With the size of the first image you can delete it from the buffer and you will get the second image.

http://www.awaresystems.be/imaging/tiff/faq.html

2013-10-15 09:05:18 -0600 answered a question Transform Red to Yellow

I think the simples way ist to convert the Image to HSV, there you can easily change the color from red to yellow. After that you can convert it back to RGB(or BGR).

Best,

2013-10-04 06:46:45 -0600 commented question OpenCV capture forward to V4L2 loopback

OpenCV is using BGR instead of RGB.

2013-09-20 07:49:27 -0600 commented answer Can't grab frame from webcamera

Yes it should do the same but I had the same Problem using VS2010 with Win 7 64-Bit using OpenCV 2.4.4. Using grab + retrieve instead of read solved it.

2013-09-20 07:30:16 -0600 answered a question Can't grab frame from webcamera

Use

cap.grab();
cap.retrieve(&frame, 0);

instead of

cap.read(frame);

Best

2013-09-19 07:03:36 -0600 answered a question 2D Aztec Barcode localization

Hi,

Yes it is possible. I´m doing it with Data Matrix Codes. I´m creating regions using a threshold. Then i´m checking the anisometry and the size of the regions. The decoding is done by zxing.

Best,

2013-02-22 07:36:12 -0600 answered a question Webcam Select Timeout error on Linux

Got the same problem using XUbuntu 12.04 + OpenCV 2.4.3.

2013-02-20 07:28:38 -0600 answered a question installing opencv in ubuntu

Use this shell script it will do anything for you. Run it as superuser. [Sorry couldn´t attache it]

[istall_opencv.sh]

arch=$(uname -m)
if [ "$arch" == "i686" -o "$arch" == "i386" -o "$arch" == "i486" -o "$arch" == "i586" ]; then
flag=1
else
flag=0
fi
echo "Installing OpenCV 2.4.3"
mkdir OpenCV
cd OpenCV
echo "Removing any pre-installed ffmpeg and x264"
sudo apt-get remove ffmpeg x264 libx264-dev
echo "Installing Dependenices"
sudo apt-get install build-essential checkinstall cmake pkg-config yasm
sudo apt-get install libtiff4-dev libjpeg-dev libjasper-dev
sudo apt-get install libavcodec-dev libavformat-dev libswscale-dev libdc1394-22-dev libxine-dev libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev libv4l-dev
sudo apt-get install python-dev python-numpy
sudo apt-get install libtbb-dev
sudo apt-get install libqt4-dev libgtk2.0-dev
echo "Downloading x264"
wget ftp://ftp.videolan.org/pub/videolan/x264/snapshots/x264-snapshot-20121126-2245-stable.tar.bz2
tar -xvf x264-snapshot-20121126-2245-stable.tar.bz2
cd x264-snapshot-20121126-2245-stable/
echo "Installing x264"
if [ $flag -eq 1 ]; then
./configure --enable-static
else
./configure --enable-shared --enable-pic
fi
make
sudo make install
cd ..
echo "Downloading ffmpeg"
wget http://ffmpeg.org/releases/ffmpeg-0.11.2.tar.bz2
echo "Installing ffmpeg"
tar -xvf ffmpeg-0.11.2.tar.bz2
cd ffmpeg-0.11.2/
if [ $flag -eq 1 ]; then
./configure --enable-gpl --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --enable-nonfree --enable-postproc --enable-version3 --enable-x11grab
else
./configure --enable-gpl --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --enable-nonfree --enable-postproc --enable-version3 --enable-x11grab --enable-shared
fi
make
sudo make install
cd ..
echo "Downloading v4l"
wget http://www.linuxtv.org/downloads/v4l-utils/v4l-utils-0.9.3.tar.bz2
echo "Installing v4l"
tar -xvf v4l-utils-0.9.3.tar.bz2
cd v4l-utils-0.9.3/
make
sudo make install
cd ..
echo "Downloading OpenCV 2.4.3"
wget -O OpenCV-2.4.3.tar.bz2 http://sourceforge.net/projects/opencvlibrary/files/opencv-unix/2.4.3/OpenCV-2.4.3.tar.bz2
echo "Installing OpenCV 2.4.3"
tar -xvf OpenCV-2.4.3.tar.bz2
cd OpenCV-2.4.3
mkdir build
cd build
cmake -D CMAKE_BUILD_TYPE=RELEASE ..
make
sudo make install
sudo echo “/usr/local/lib” >> /etc/ld.so.conf
sudo ldconfig
echo "OpenCV 2.4.3 ready to be used"
2013-02-20 03:03:58 -0600 received badge  Critic (source)
2013-02-19 02:06:25 -0600 answered a question Tricky labyrinth solving

Hi, I would first use some kind of threshold on the image. So you have all ways white and all walls black.

Then I would create a Integer-array with the map of the Labyrinth.

Now you can easy use the algorythm first turn left, walk forward till there´s a Wall then turn right,walk forward till wall then turn right........ This will work for the most Labyrinths.

or

You search all impasse [if way = 0 and wall = 1 , all the fields that border on three ones] and fill them till the next crossing. That will give you all possible ways.[work´s everytime]

You can also use: Maze Algorythm from Gaston Tarry [work´s everytime]

2013-02-04 03:36:30 -0600 answered a question How to set or get VideoCapture properties?

Hey, the problem is that CV_CAP_PROP_FPS isn´t implemented yet. If you look at highgui/src/cap_libv4l2.cpp you´ll find this switch case in function icvGetPropertyCAM_V4L ...

  switch (property_id) {
case CV_CAP_PROP_FRAME_WIDTH:
case CV_CAP_PROP_FRAME_HEIGHT:
  CLEAR (capture->form);
  capture->form.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
  if (-1 == xioctl (capture->deviceHandle, VIDIOC_G_FMT, &capture->form)) {
      /* display an error message, and return an error code */
      perror ("VIDIOC_G_FMT");
    if (v4l1_ioctl (capture->deviceHandle, VIDIOCGWIN, &capture->captureWindow) < 0) {
      fprintf (stderr, "HIGHGUI ERROR: V4L:cap_libv4l: Unable to determine size of incoming image\n");
      icvCloseCAM_V4L(capture);
      return -1;
    } else {
      int retval = (property_id == CV_CAP_PROP_FRAME_WIDTH)?capture->captureWindow.width:capture->captureWindow.height;
      return retval / 0xFFFF;
    }
  }
  return (property_id == CV_CAP_PROP_FRAME_WIDTH)?capture->form.fmt.pix.width:capture->form.fmt.pix.height;
case CV_CAP_PROP_BRIGHTNESS:
  sprintf(name, "Brightness");
  capture->control.id = V4L2_CID_BRIGHTNESS;
  break;
case CV_CAP_PROP_CONTRAST:
  sprintf(name, "Contrast");
  capture->control.id = V4L2_CID_CONTRAST;
  break;
case CV_CAP_PROP_SATURATION:
  sprintf(name, "Saturation");
  capture->control.id = V4L2_CID_SATURATION;
  break;
case CV_CAP_PROP_HUE:
  sprintf(name, "Hue");
  capture->control.id = V4L2_CID_HUE;
  break;
case CV_CAP_PROP_GAIN:
  sprintf(name, "Gain");
  capture->control.id = V4L2_CID_GAIN;
  break;
case CV_CAP_PROP_EXPOSURE:
  sprintf(name, "Exposure");
  capture->control.id = V4L2_CID_EXPOSURE;
  break;
case CV_CAP_PROP_FOCUS:
  sprintf(name, "Focus");
  capture->control.id = V4L2_CID_FOCUS_ABSOLUTE;
  break;
default:
  sprintf(name, "<unknown property string>");
  capture->control.id = property_id;

....

As you can see your error is the default case. But you can modify this file. But i think it is easy to implement, try:

    case CV_CAP_PROP_FPS:
  sprintf(name, "Focus");
  return capture->GetFrameRate() ;

I´ve did the same with CV_CAP_PROP_FOCUS an it works fine.

Best

2013-01-24 03:40:42 -0600 answered a question Features and matches on buildings

Surf is looking for eye-catching points. This occurs inter alia by the contrast between the umligenden pixels. I think your buildings have very few of these points.

Here are some Tips:

  • Use Grayscale Images (ore cast them to Grayscale)
  • Sharp them (Sharp Image = Original Image - Gausian(Original Image))

Maybe you can try a Sobel and add it to the sharpened Images. I think that would give you more matching Keypoints at the roof area and on the buildings.

You should also use a dynamic threshold for matching!. Like:

if((matches2[i][0].distance < 0.56*(matches2[i][1].distance)) && ((int) matches2[i].size()<=2 && (int) matches2[i].size()>0))

You could also try a KNN-Matcher instead of a BF-Matcher.

2013-01-18 04:44:37 -0600 answered a question Header and pointer of the Mat object in Open CV?

Hi,

Here you find the exact documentation

http://opencv.willowgarage.com/documentation/cpp/basic_structures.html

uchar* data is the pointer to the image data.

2013-01-18 04:29:27 -0600 received badge  Organizer (source)
2013-01-17 02:17:27 -0600 answered a question VS2010+OpenCV2.4.3 setup unsuccess

Copy the core243d.dll in your running directory. (In VS usually /Documents/Visual Studio 2010/Projects/<your project="" name="">/<your project="" name="">/) I think there will be more errors of the same kind after you´ve copied the core.dll. So you have to copy all the requested DLLs into this directory.

2013-01-09 02:33:25 -0600 answered a question I cant access my webcam Opencv 2.4.3

Try cvCreateCameraCapture(0). Maybe you should use Mat instead of IplImage.

2012-12-20 05:53:42 -0600 commented answer Why is FREAK so slow?

How much Keypoints did you get?

2012-12-19 08:55:53 -0600 answered a question Real-Time Video Zoom & Sharpening

Try Unsharp masking.

-> Sharp Image = Original Image - Gausian(Original Image).

2012-12-18 10:05:47 -0600 answered a question Why is FREAK so slow?

Hi, can you give more details. Like which detector you use. My experience is that the detector requires the most time. Using Windows FREAK is faster then SIFT or Surf. Maybe there´s a issue in the implementation of the Android version. Otherwise the reason could be tha FREAK uses floating point descriptors, like SIFT and SURF.

2012-12-14 16:51:40 -0600 received badge  Teacher (source)
2012-12-13 04:20:13 -0600 asked a question Change focus of a V4l2 Cam

Hi there, i´m using Ubuntu 12.10 with all dependencies and libv4l2.I want to change the focus of a V4l2 Cam. I´m trieing it with the following code:

.
.
VideoCapture cam;
.
.
cam.set(CV_CAP_PROP_FOCUS ,d);

Capture frames works.

If I use Windows 7 the code works fine.

2012-12-13 04:11:24 -0600 commented answer VideoCapture parameters CV_CAP_PROP_FOURCC or CV_CAP_PROP_FPS, among others, not working

Same thing with CV_CAP_PROP_FOCUS and many others....

2012-12-13 04:10:15 -0600 received badge  Supporter (source)
2012-12-12 08:35:26 -0600 answered a question problem with reading image to Mat

Try this version.

` #include <opencv.hpp> #include <iostream>

using namespace std; using namespace cv;

int main(int argc, char *argv[]) { Mat img = imread("lena.jpg", 1); namedWindow("Lena", CV_WINDOW_AUTOSIZE); imshow("Lena", img); waitKey();

return 0;

} `

2012-12-10 02:01:43 -0600 commented answer How to filter FREAK+BruteForceMatcher result?

Hi, the difference betwenn out and good matches is only the faktor (059 and 0.675), tah gives me the ratio good/out =x, the threshold of x is 0.2. I´ve tried a little with static matches recognition like if good_matches.size()>10, but i figuered out that the ratio way gives me better solution.

2012-12-04 03:27:42 -0600 received badge  Editor (source)
2012-12-04 03:27:42 -0600 edited answer Feature Matching with FLANN - Exception on "nonfree_init.cpp"

Also had a problem using the FLANN Matcher. Just changed

FlannBasedMatcher matcher

to

BFMatcher matcher(NORM_L2,false);