Ask Your Question

BMR's profile - activity

2017-04-01 11:47:25 -0600 received badge  Popular Question (source)
2017-04-01 11:47:25 -0600 received badge  Famous Question (source)
2017-04-01 11:47:25 -0600 received badge  Notable Question (source)
2016-11-15 10:42:02 -0600 received badge  Famous Question (source)
2015-07-28 11:41:20 -0600 received badge  Notable Question (source)
2014-10-26 23:01:49 -0600 received badge  Popular Question (source)
2014-05-27 17:39:42 -0600 received badge  Notable Question (source)
2014-05-27 17:39:42 -0600 received badge  Famous Question (source)
2014-05-27 17:39:42 -0600 received badge  Popular Question (source)
2013-05-22 12:36:35 -0600 asked a question Writing to a file storage problem in release

i am using this code in a project and when i run it in the release mode it is give me exception but this don't accure in debug mode

#include <time.h>

using namespace cv;

int main(int, char** argv)
{
    FileStorage fs("test.yml", FileStorage::WRITE);

    fs << "frameCount" << 5;
    time_t rawtime; time(&rawtime);
    fs << "calibrationDate" << asctime(localtime(&rawtime));
    Mat cameraMatrix = (Mat_<double>(3,3) << 1000, 0, 320, 0, 1000, 240, 0, 0, 1);
    Mat distCoeffs = (Mat_<double>(5,1) << 0.1, 0.01, -0.001, 0, 0);
    fs << "cameraMatrix" << cameraMatrix << "distCoeffs" << distCoeffs;
    fs << "features" << "[";
    for( int i = 0; i < 3; i++ )
    {
        int x = rand() % 640;
        int y = rand() % 480;
        uchar lbp = rand() % 256;

        fs << "{:" << "x" << x << "y" << y << "lbp" << "[:";
        for( int j = 0; j < 8; j++ )
            fs << ((lbp >> j) & 1);
        fs << "]" << "}";
    }
    fs << "]";
    fs.release();
    return 0;
}

this code from here

2013-03-26 16:12:29 -0600 asked a question Sift Algorithm

plz i have a sift algorithm which make locs and descriptor and i want to save for each image which has locs and descriptor in to skip list data structure i want to know how i sorted them to make the search about any image easily ??

2013-03-14 18:12:45 -0600 asked a question hand detection

i have a xml file which detect a hand but it detect a hand when only the five fingers found but when i make any shape with my hand it didn't detect it plz i want to know how to solve this problem ??

2013-03-08 10:03:56 -0600 commented answer read 2d array into opencv mat

double **theArray; i do that for the array to be dynamic is there another solution??

2013-03-08 08:38:38 -0600 asked a question read 2d array into opencv mat

i need to read dynamic two dimensional array in opencv mat

int main()
{
Mat matrix;
double **theArray;
int numOfRows,numOfCols;

cin >> numOfRows ;
cin >> numOfCols ;

theArray = AllocateDynamicArray<double>(numOfRows,numOfCols);

matrix = Mat(numOfRows,numOfCols,CV_64FC1,&theArray);

string filename = "IN.xml";
FileStorage fs1(filename, FileStorage::WRITE);
fs1.open(filename, FileStorage::WRITE);
fs1 << "locsINMat"          << matrix;  
fs1 << "descriptorsINMat"   << matrix;
fs1.release();
cout << "---------------------" << endl;

FreeDynamicArray(theArray);

}
template <typename T> 
T **AllocateDynamicArray( int nRows, int nCols)
{
      T **dynamicArray;

      dynamicArray = new T*[nRows];
      for( int i = 0 ; i < nRows ; i++ )
      dynamicArray[i] = new T [nCols];

      return dynamicArray;
}

template <typename T>
void FreeDynamicArray(T** dArray)
{
      delete [] *dArray;
      delete [] dArray;
}

i get this exception: Unhandled exception at 0x5d08f1aa in GP.exe: 0xC0000005: Access violation reading location 0x003f4000.

2013-02-22 10:04:48 -0600 commented answer saving this value

Thanks alot :)

2013-02-22 10:03:42 -0600 commented question saving this value

@SR : i know but i convert from matlab to open cv , and this question will help me in things related to open cv :)

2013-02-20 09:12:19 -0600 asked a question saving this value
double d = 5.5057787190877361e-001;
cout << setprecision(15) << fixed << d <<endl;

this prints 0.550577871908774

and instead of printing it, i need to save this value "0.550577871908774"

what i should to do ?

2013-02-18 16:47:18 -0600 commented question about how to minimize a float value

i converted from matlab to open cv

and when i converted sift code which got the keypoints and it's descriptors and locations to open cv it got length as 15 digits but when i converted it to open cv it got me length greater than 15

then i need this length to be 15 only to get right result

2013-02-18 14:30:42 -0600 asked a question about how to minimize a float value

plz i want to minimize this length of value to be 15 digit only 7477124976849425e-001 how i do this ??

2013-02-16 11:19:56 -0600 asked a question Read float value from file c++

i have a text file of values

133.25 129.40 41.69 2.915

when i read it:

fscanf(File,"%f",&floatNumber[i]);

i get thes values

1.3325000000000000e+002, 1.2939999389648437e+002, 4.1689998626708984e+001 2.9149999618530273e+000

the first value is ok but the other three values why they are different ??

2013-02-09 11:17:23 -0600 received badge  Scholar (source)
2013-02-09 11:00:47 -0600 received badge  Editor (source)
2013-02-09 10:49:33 -0600 asked a question dot product

i try to get the dot product of 2 matrices A and B.

double dA[] = {
    1.0, 2.0,
    1.7, 0.8,
    0.6, 1.0
    }; 
    Mat A = Mat(3, 2, CV_32FC1, dA );
    double dB[] = {
    1.2, 0.0, 1.7,
    0.4, 1.3, 0.1
    };
    Mat B = Mat( 3,2,  CV_32FC1, dB );
    double b = dot(A,B);          //  but i get error here

Error:no instance of function template "cv::dot" matches the argument list

how can i use thes function or any other function to get the dot product of this 2 matrices

2013-02-07 07:04:22 -0600 asked a question fwrite in pgm file in open cv

plz i have a code in matlab which write in a pgm file "fwrite(f, image', 'uint8');" and i convert it to open cv as fwrite(image,CV_8UC1,sizeof(image),pFile);

but it doesn't write anything in a file

2013-02-05 17:43:14 -0600 marked best answer plz i want a code that asking if the image is RGB or not and if it RGB this function return 1 else return 0

i want to know if image is "RGB" or not

2013-02-02 14:23:17 -0600 commented answer evaluation

plz if i want to implement an Eval () function on string like this

command = '!siftWin32 '; // !siftWin32 is an exe but it is treated as a string until an evaluation function can evaluate it

command = [command ' <tmp.pgm >tmp.key'];

eval(command);

this code wrote in matlab but i want a code in open cv instead of this can you help me Thanks !!

2013-01-29 14:11:47 -0600 asked a question evaluation

plz i convert from code matlab to an open cv code and i need a function that instead of Eval() function