Funion cvSet2d [closed]

asked 2020-02-12 06:44:30 -0500

I made a project about 2 years ago when I used open cv 2.3.4 now that I download the new 4.0 library, this don't recognize the cvSet2d command to change the color to the pixel an make and new image that i separed to make a diferent recognition! If any person can tell me which is the new command or which one i can use! Thanks a lot of

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by berak
close date 2020-02-13 01:21:52.278424

Comments

I made a project about 2 years ago

the C-api you're trying to use was deprecated 10 years ago, and now it's entirely gone.

rewrite your program, and use the c++ api (cv::Mat)

berak gravatar imageberak ( 2020-02-12 07:02:31 -0500 )edit

I try this but they tell me that use of uneclared identifier 'cvSet2D' and I try with cv:Set but the dont have any funcion similar.

Mat azul, image;
split(image,rgb); 

    rojo=rgb[2]; 
    verde=rgb[1];
    azul=rgb[0];

for(int i=0;i<azulrow;i++){
        for(int j=0;j<azulweigth;j++) {


            valorazul=azul.at<uchar>(i,j);

           if(valorazul>50){
           cvSet2D(azul1,i,j,va1);
           }
}}

If you can guide me i woud be very grateul

jaimelopezduque gravatar imagejaimelopezduque ( 2020-02-12 08:53:21 -0500 )edit
1

you won't be able to compile this using opencv 4.

you could checkout the 3.4 branch instead and rebuild, maybe it will compile.

berak gravatar imageberak ( 2020-02-12 09:07:32 -0500 )edit

I'm sorry to bother you again it isnt any other funtion in opencv 4 that allows to do that and a thanks!! ALL THE GOOD VIBE FOR YOU

jaimelopezduque gravatar imagejaimelopezduque ( 2020-02-12 09:16:42 -0500 )edit
berak gravatar imageberak ( 2020-02-13 01:21:30 -0500 )edit