Ask Your Question

nobot's profile - activity

2019-07-06 06:12:02 -0500 asked a question failing to build opencv with opengl

failing to build opencv with opengl Hello, I am following this script by JK Jung for installing opencv in Jetson Nano,

2019-04-13 06:09:59 -0500 received badge  Notable Question (source)
2019-03-21 13:28:34 -0500 commented answer multithreading in c++, capturing thread stops after some loops

Thank you for the suggestion, but i am using the threads for these exact purposes, my input is 1920*1080 of 60 fps, and

2019-03-20 05:30:38 -0500 asked a question multithreading in c++, capturing thread stops after some loops

multithreading in c++, capturing thread stops after some loops opencv 3.4.2 OS ubuntu 16.04 g++ 7.4.0 I am trying cap

2019-01-02 03:31:52 -0500 commented question if I use UMat , it is giving exception error

ok, thank you.

2019-01-02 00:20:08 -0500 asked a question if I use UMat , it is giving exception error

if I use UMat , it is giving exception error if I use UMat , it is giving exception error terminate called after throwin

2018-12-31 06:46:55 -0500 commented answer unable to set saturation in grayworld white balancing of opencv_extra module

it is showing error terminate called after throwing an instance of 'cv::Exception' what(): OpenCV(3.4.2) /home/u-16i/

2018-12-31 06:45:40 -0500 commented answer unable to set saturation in grayworld white balancing of opencv_extra module

but if I use UMat , it is giving exception error, any reason??` { Mat src_mat; UMat src_umat,resized,res; float inp

2018-12-31 06:44:58 -0500 commented answer unable to set saturation in grayworld white balancing of opencv_extra module

but if I use UMat , it is giving exception error, any reason??` { Mat src_mat; UMat src_umat,resized,res; fl

2018-12-31 02:47:54 -0500 commented answer unable to set saturation in grayworld white balancing of opencv_extra module

thanks, it is solved

2018-12-31 02:46:59 -0500 marked best answer unable to set saturation in grayworld white balancing of opencv_extra module

virtual void cv::xphoto::GrayworldWB::setSaturationThreshold ( float val ) ;

without this function, the below code is having no issues, but when i am trying to get or set the saturation level it is giving the error:cannot call member function ‘virtual void cv::xphoto::GrayworldWB::setSaturationThreshold(float)’ without object, what is the correct way to call the function??

int main(int argc, const char **argv)

{

Mat src,resized,res;

src = imread("/home/u-16i/Pictures/wp/beach_flowers-wallpaper-1440x900.jpg");
if (src.empty())
{
    printf("Cannot read image file");
    return -1;
}
resize(src, resized, Size(), .49, 0.49, CV_INTER_AREA);
imshow("b4 white balance", resized);

Ptr<xphoto::GrayworldWB> wb =xphoto::createGrayworldWB();
xphoto::GrayworldWB::setSaturationThreshold(0.5);//error: cannot call member function ‘virtual void cv::xphoto::GrayworldWB::setSaturationThreshold(float)’ without object
wb->balanceWhite(resized, res);

    imshow("after white balance", res);

waitKey(0);
return 0;

}

2018-12-31 01:09:55 -0500 asked a question unable to set saturation in grayworld white balancing of opencv_extra module

unable to set saturation in grayworld white balancing of opencv_extra module virtual void cv::xphoto::GrayworldWB::setSa

2018-12-26 04:41:41 -0500 commented question opencv 3.4.2 user memory leak

and the same is valid for Mat also??

2018-12-26 04:38:30 -0500 commented question opencv 3.4.2 user memory leak

i would like to known that if i am doing some inplace operation in UMat, will that result into some intermediate outputs

2018-12-26 04:18:05 -0500 asked a question opencv 3.4.2 user memory leak

opencv 3.4.2 user memory leak i am using opencv 3.4.2, i wanted to know that if in an infinite for loop i keep on captur

2018-12-20 10:15:49 -0500 received badge  Student (source)
2018-12-20 10:15:38 -0500 marked best answer Is it possible to create a BGR image from predefined 3 (1-channel) image

I am trying to create 1 CV_8UC3 image from 3 different CV_8UC1 images that I already have, i.e I am trying to allocate the different single channel images that I already have into a single 1 Multi-Dimensional Image

Mat image3c(width, height, CV_8UC3, **data**)

Is it either possible to-

  1. give the data directly during the CV_8UC3 creation

  2. std::vector<Mat> channels{ channelB, channelG, channelR }; // already have individual channels BGR in CV_8UC1 format merge(channels, image3c);

  3. splitting the image3c Mat and then copying the predefined CV_8UC1 into the channels and then merging is possible, but trying best to avoid that

2018-11-06 02:28:18 -0500 received badge  Popular Question (source)
2018-10-18 02:47:36 -0500 marked best answer after successfully building with opencv contrib modules I am getting error

i used the following configuration

cmake -D CMAKE_BUILD_TYPE=RELEASE

-D CMAKE_INSTALL_PREFIX=/usr/local
-D INSTALL_C_EXAMPLES=ON -D INSTALL_PYTHON_EXAMPLES=ON
-D OPENCV_EXTRA_MODULES_PATH=../../opencv_contrib/modules

-D BUILD_OPENCV_ENABLE_NONFREE=ON
-D WITH_OPENCL=ON
-D WITH_TBB=OFF -D WITH_OPENMP=ON -D WITH_V4L=ON
-D WITH_QT=OFF
-D WITH_OPENGL=ON
-D BUILD_EXAMPLES=ON ..

it did installed successfully

and for compiling my code, I Used
g++ 3bm3d.cpp -o bm3d `pkg-config --cflags --libs opencv ` -lopencv_xphoto

but still I am getting this infamous error ->

terminate called after throwing an instance of 'cv::Exception' what(): OpenCV(3.4.2) /home/odroid/Desktop/is2/opencv_contrib/modules/xphoto/src/bm3d_image_denoising.cpp:303: error: (-213:The function/feature is not implemented) This algorithm is patented and is excluded in this configuration;Set OPENCV_ENABLE_NONFREE CMake option and rebuild the library in function 'bm3dDenoising'

what else could I be possibly missing ??

2018-09-18 06:39:24 -0500 commented answer what is the correct data type mat.forEach<Vec3b>(Operator());

yes , Indeed it worked. thanks !!

2018-09-18 06:36:58 -0500 received badge  Supporter (source)
2018-09-18 05:19:04 -0500 asked a question what is the correct data type mat.forEach<Vec3b>(Operator());

what is the correct data type mat.forEach<vec3b>(Operator()); if for 3-channel of type int I am usin

2018-09-05 22:59:04 -0500 commented answer after turning BUILD_SHARED_LIBS to OFF , there are too many undefined references

yes, I intend to do so.

2018-09-05 22:51:31 -0500 commented answer after turning BUILD_SHARED_LIBS to OFF , there are too many undefined references

no actually, I am compiling in arm.

2018-09-05 06:46:17 -0500 commented answer after turning BUILD_SHARED_LIBS to OFF , there are too many undefined references

/usr/bin/arm-linux-gnueabihf-ld: cannot find -lgflags_shared any lead ??@berak

2018-09-05 06:43:35 -0500 commented answer after turning BUILD_SHARED_LIBS to OFF , there are too many undefined references

-- Build files have been written to: /home/odroid/Desktop/is2/@_opencl/static/s.0.1.0/s.0.1.0/main odroid@odroid:~/Deskt

2018-09-05 06:43:06 -0500 commented answer after turning BUILD_SHARED_LIBS to OFF , there are too many undefined references

nope unfortunately it didn,t. odroid@odroid:~/Desktop/is2/@_opencl/static/s.0.1.0/s.0.1.0/main$ cmake . -- The C compil

2018-09-05 06:21:11 -0500 commented answer after turning BUILD_SHARED_LIBS to OFF , there are too many undefined references

Thank you Berak, somehow things got a bit simplified, if I try to specify everything explicitly, how will I come to kn

2018-09-05 06:19:01 -0500 commented answer after turning BUILD_SHARED_LIBS to OFF , there are too many undefined references

if I try to specify everything explicitly, how will I come to know all the dependencies I have, that I have to Link

2018-09-05 02:52:20 -0500 asked a question after turning BUILD_SHARED_LIBS to OFF , there are too many undefined references

after turning BUILD_SHARED_LIBS to OFF , there are too many undefined references previously during dynamic linking of op

2018-08-22 01:47:09 -0500 commented question after merging and extracting the BGR channel, compilation is successful,but there is a run-time error: ILLEGAL OPERATION

it is based on one of my earlier post

2018-08-22 01:44:21 -0500 edited question after merging and extracting the BGR channel, compilation is successful,but there is a run-time error: ILLEGAL OPERATION

after merging and extracting the BGR channel, error is coming after compilation, ILLEGAL OPERATION #include <opencv2

2018-08-22 01:42:45 -0500 asked a question after merging and extracting the BGR channel, compilation is successful,but there is a run-time error: ILLEGAL OPERATION

after merging and extracting the BGR channel, error is coming after compilation, ILLEGAL OPERATION #include <opencv2

2018-08-16 04:21:43 -0500 answered a question Mat::forEach operation is resulting in error

I am working like this--> cv::merge(channels, added3); (1) added3.forEach<Pixel

2018-08-14 10:48:28 -0500 edited question Is it possible to create a BGR image from predefined 3 (1-channel) image

Is it possible to create a BGR image from predefined 3 (1-channel) image I am trying to create 1 CV_8UC3 image from 3 di

2018-08-14 10:45:03 -0500 edited question Is it possible to create a BGR image from predefined 3 (1-channel) images

Is it possible to create a BGR image from predefined 3 (1-channel) image I am trying to create 1 CV_8UC3 image from 3 di

2018-08-14 10:44:48 -0500 edited question Is it possible to create a BGR image from predefined 3 (1-channel) images

Is it possible to create a BGR image from predefined 3 (1-channel) image I am trying to create 1 CV_8UC3 image from 3 di

2018-08-14 10:41:53 -0500 asked a question Is it possible to create a BGR image from predefined 3 (1-channel) images

Is it possible to create a BGR image from predefined 3 (1-channel) image I am trying to create 1 CV_8UC3 image from 3 di

2018-08-14 10:41:53 -0500 asked a question Is it possible to create a BGR image from predefined 3 (1-channel) image

Is it possible to create a BGR image from predefined 3 (1-channel) image I am trying to create 1 CV_8UC3 image from 3 di

2018-08-14 10:41:48 -0500 asked a question Is it possible to create a BGR image from predefined 3 (1-channel) image

Is it possible to create a BGR image from predefined 3 (1-channel) image I am trying to create 1 CV_8UC3 image from 3 di

2018-08-14 10:41:43 -0500 asked a question Is it possible to create a BGR image from predefined 3 (1-channel) image

Is it possible to create a BGR image from predefined 3 (1-channel) image I am trying to create 1 CV_8UC3 image from 3 di

2018-08-14 09:41:13 -0500 marked best answer Mat::forEach operation is resulting in error

by going through this link I got some information , and tested it. I am working on opencv v3.4.2 in Ubuntu 18.04.

If I am using cv::Point_<uchar> Pixel, its giving me a wrong output, but if uchar Pixel is being used the error is given at the compilation time only.

In member function 'void Operator::operator()(Pixel&, const int*) const': for_each.cpp:23:78: error: request for member 'x' in 'pixel', which is of non-class type 'Pixel {aka unsigned char}' rmat("[%d,%d]= %d \n",position[0],position[1],(uchar)pixel.x);

code

    #include <opencv2/opencv.hpp>
#include <stdio.h>
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/imgproc/imgproc.hpp"
#include <iostream>

using namespace std;
using namespace cv;
using std::cout;




typedef cv::Point_<uchar> Pixel;//wrong
//typedef uchar Pixel;  //  correct
//typedef Point3_<uint8_t> Pixel;



struct Operator {
    void operator ()(Pixel &pixel, const int * position) const 
    {           
        cout << format("[%d,%d]= %d \n",position[0],position[1],(uchar)pixel.x);      
    }
};

int main( int argc, char* argv[])
{    
    Mat mTest(Size(3, 2), CV_8UC1,Scalar(0));   
    randn(mTest,Scalar(125),Scalar(125));
    cout<<"I am using ----> cv::Point_<uchar> Pixel  \n";
    //cout<<"I am using ----> uchar Pixel \n";
    cout<< format (" Size : %d , %d \n\n",mTest.rows,mTest.cols);

//for(;;)
 {
    for (int Rows = 0; Rows < mTest.rows; Rows++)
    {
        for (int Cols = 0; Cols < mTest.cols; Cols++)
        {
            cout << format("[%d,%d]= %d \t",Rows,Cols,mTest.at<uchar>(Rows,Cols));
        }
        cout << "\n";
    }

    cout << "\n\n";
  }

//for(;;)
    mTest.forEach<Pixel>(Operator());

    waitKey();
    return 0;
}

Is the problem with the new opencv version ?? And can it be resolved??

2018-08-14 09:41:07 -0500 commented answer Mat::forEach operation is resulting in error

is there any other way without copying the images, it is substantially increasing the overhead!!

2018-08-14 09:34:23 -0500 commented answer Mat::forEach operation is resulting in error

Mat mask = data0 < data1; will this compare the per pixel intensity of image data0 & data1