Ask Your Question

pickle27's profile - activity

2017-03-19 15:34:58 -0500 received badge  Nice Question (source)
2016-03-03 01:42:27 -0500 received badge  Famous Question (source)
2015-01-07 10:11:14 -0500 received badge  Notable Question (source)
2014-05-27 11:32:45 -0500 received badge  Popular Question (source)
2013-11-21 22:28:51 -0500 answered a question How to build opencv_world in 2.4.7?

looks like you need the zlib library - I haven't installed it but a good place to start would be to head to their site and follow their instructions. Best of Luck!

2013-08-03 19:54:01 -0500 commented answer Machine learning save/load problem

If you look at the source save and load doesn't seem to be implemented for CvKNearest

2013-08-03 19:40:32 -0500 commented answer How to read/write a PCA object from/to a cv::FileStorage ?

Agreed, otherwise the above posted solution by Mostafa is what I do

2013-08-03 19:39:23 -0500 commented answer FileStorage: can write but can't read Size, Rect, etc.

Yeah I usually do something like this too - however I wonder if this could be done cleanly? The problem is also there for cv::Vec I think, maybe we should open a ticket?

2013-08-03 19:36:02 -0500 received badge  Supporter (source)
2013-08-03 19:35:40 -0500 commented answer How to use retained variance in PCA?

yes I contributed this code and this is correct

2012-12-16 21:16:09 -0500 received badge  Editor (source)
2012-12-16 21:15:22 -0500 commented question cv::FileStorage for custom Types Problem

oops yes that is a copy paste problem

2012-10-29 17:16:56 -0500 asked a question Webcam Select Timeout error on Linux


after running standard opencv video capture code for several seconds I receive an error that says: select timeout and the program freezes. I've followed standard build procedures, has anyone else encountered this error before?


2012-10-26 14:00:12 -0500 asked a question Webcam capture freezes after a few seconds in Ubuntu


I am having an issue capturing from a webcam using OpenCV, the capture starts and works fine but then freezes after a few seconds. Here is the code I was running:

import cv2

cam = cv2.VideoCapture(0)

    flag, image =
    cv2.imshow("image", image)

I have tried on a few different computers and the same problem happens. It also happens when I try and view the webcam using cheese. I must be doing something wrong (is this a v4l issue?), I've followed standard OpenCV build tutorials and I've had this issue since at least 2.4.1.

I'd like to get this issue fixed has anyone else had an issue like this?

2012-09-13 03:03:31 -0500 received badge  Student (source)
2012-09-12 14:59:29 -0500 asked a question OpenCV and Point Grey Grasshopper Issues


We're having issues with capturing images from our Point Grey Grasshopper camera. The camera returns images fine but if an image is not captured for a while then the image that gets returns is not the latest image but an image from a while ago in between the last capture and the current time.

Anyone else encountered this?

2012-08-17 15:07:19 -0500 asked a question cv::FileStorage for custom Types Problem

Hello, I am trying to write code allowing me to cleanly use opencv FileStorage with classes I have built - I have done this before with success but this time it is not working and I don't know why, plus the compiler error output is strange.

Here is a code snip that is what I am trying to do:

// .h file

#include <string>
#include <opencv2/core/core.hpp>

namespace alg

// Base class for Algorithm Parameters
class Params
    virtual ~Params() {}
    float &Threshold() { return m_threshold; }
    virtual void write(cv::FileStorage& fs) const = 0; // write serialization
    virtual void read(const cv::FileNode& node) = 0; // read serialization

    float m_threshold;

// Class for the Parameters of a specific Algorithm
class Alg_Params : public Params
        m_threshold = 40;

    int &Num() { return m_num; }

    void write(cv::FileStorage& fs) const // write serialization
        fs << "{"
           << "Threshold" << m_threshold
           << "Num" << m_num
           << "}";
    void read(const cv::FileNode& node) // read serialization
        m_threshold = (float)node["Threshold"];
        m_num = (int)node["Num"];

    int m_num;

} // end Alg namespace

//These write and read functions must exist as per the inline functions in operations.hpp
static void write(cv::FileStorage& fs, const std::string&, Alg_Params& x)

static void read(const cv::FileNode& node, Alg_Params& x, const Alg_Params& default_value = Alg_Params())
    x = default_value;

// then in .cpp
// in a class called "Algorithm" for example

Algorithm::Save(std::string file)

    cv::FileStorage fs;, cv::FileStorage::WRITE);

    fs << "Params" << m_params; // an instance of Alg_Params

    // saving other things afterwards



The only thing that is different from when I have done this before is the use of a base class and the fact that I have the code for the saving and loading in the header. I tried moving the static void write and read to the cpp but I get the same error.

The error I get is: no matching function for call to 'write(cv::FileStorage&, std::sting&, const Alg_Params&)' but the weird part it I also get this warning 'write(cv::FileStorage&, std::sting&, const Alg_Params&)' defined but not used [-Wunsed-function] This doesn't make sense it should see this function way before it needs it.

I am building using Qt Creator on Linux.

Thanks for the help!