cvcanny error

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

cvcanny error

coskun kazma
I am implementing CvCanny() function, thare is no copile error but at runtime an error accured, that is;Unsupported format or combination of formats () int function cvCanny. 
C:\User\VP\opencv\cv\src\cvcanny.cpp(76)also code block is,IplImage* frame2 = cvCreateImage(cvGetSize(frame), IPL_DEPTH_8U, 1);
cvCvtColor(frame, frame2, CV_BGR2GRAY);
cvCanny(frame, frame2, 0.3, 0.8);thanks



      New Email addresses available on Yahoo!
Get the Email name you've always wanted on the new @ymail and @rocketmail.
Hurry before someone else does!
http://mail.promotions.yahoo.com/newdomains/aa/

[Non-text portions of this message have been removed]

Reply | Threaded
Open this post in threaded view
|

Re: cvcanny error

sichelschmidt@rocketmail.com
The Input Image of cvCanny has to be grayscale as well.
This should work:

IplImage* frame2 = cvCreateImage(cvGetSize(frame), IPL_DEPTH_8U, 1);
IplImage* cannyFrame = cvCreateImage(cvGetSize(frame), IPL_DEPTH_8U, 1);
cvCvtColor(frame, frame2, CV_BGR2GRAY);
cvCanny(frame2, cannyFrame, 0.3, 0.8);

Cheers,
Sebastian


--- In [hidden email], coskun kazma <coskun2525@...> wrote:
>
> I am implementing CvCanny() function, thare is no copile error but
at runtime an error accured, that is;Unsupported format or combination
of formats () int function cvCanny. 
> C:\User\VP\opencv\cv\src\cvcanny.cpp(76)also code block is,IplImage*
frame2 = cvCreateImage(cvGetSize(frame), IPL_DEPTH_8U, 1);
> cvCvtColor(frame, frame2, CV_BGR2GRAY);
> cvCanny(frame, frame2, 0.3, 0.8);thanks
>
>
>
>       New Email addresses available on Yahoo!
> Get the Email name you&#39;ve always wanted on the new @ymail and
@rocketmail.
> Hurry before someone else does!
> http://mail.promotions.yahoo.com/newdomains/aa/
>
> [Non-text portions of this message have been removed]
>


Reply | Threaded
Open this post in threaded view
|

QLabel Slot

abdelhak mahmoudi
In reply to this post by coskun kazma
Hi, please help!
error message :Object::connect: No such slot QWidget::changerContenuLabel(m_label)

#include "MaFenetre.h"

MaFenetre::MaFenetre() : QWidget()
{
    //Label
    int largeur = QImage("image.jpg").width();
    int hauteur = QImage("image.jpg").height();
    m_label = new QLabel(this);
    m_label->setGeometry(0,0,largeur, hauteur);

    // Boutton
    m_bouton = new QPushButton("Ok", this);
    m_bouton->setGeometry(largeur/2 - 60, hauteur+10, 120, 40);
    m_bouton->setFont(QFont("Comic Sans MS", 14));
    m_bouton->setCursor(Qt::PointingHandCursor);

    QObject::connect(
            m_bouton,
            SIGNAL(clicked()),
            this,
            SLOT(changerContenuLabel(m_label))
    );
}

void MaFenetre::changerContenuLabel(QLabel *label)
{
    label->setPixmap(QPixmap::fromImage(QImage("image.jpg")));
}
//Where MaFenetre.h:
 #ifndef MAFENETRE_H_
#define MAFENETRE_H_

#include <QApplication>
#include <QWidget>
#include <QPushButton>
#include <QLabel>
#include <QPixmap>
#include <QImage>
#include <QSlider>
#include <QLCDNumber>


class MaFenetre : public QWidget
{
    public:
    MaFenetre();

    public slots:
    void changerContenuLabel(QLabel *label);

    private:

    QPushButton *m_bouton;
    QLabel *m_label;
    /*QSlider *m_slider;
    QLCDNumber *m_lcd*/;
};
#endif /* MAFENETRE_H_ */

________________________________


     

[Non-text portions of this message have been removed]

Reply | Threaded
Open this post in threaded view
|

Res: cvcanny error

Raphael Gava
In reply to this post by coskun kazma
im having the same error... if someone can help me too.




________________________________
De: coskun kazma <[hidden email]>
Para: [hidden email]
Enviadas: Terça-feira, 13 de Janeiro de 2009 12:14:28
Assunto: [OpenCV] cvcanny error


I am implementing CvCanny() function, thare is no copile error but at runtime an error accured, that is;Unsupported format or combination of formats () int function cvCanny.
C:\User\VP\opencv\ cv\src\cvcanny. cpp(76)also code block is,IplImage* frame2 = cvCreateImage( cvGetSize( frame), IPL_DEPTH_8U, 1);
cvCvtColor(frame, frame2, CV_BGR2GRAY) ;
cvCanny(frame, frame2, 0.3, 0.8);thanks

New Email addresses available on Yahoo!
Get the Email name you&#39;ve always wanted on the new @ymail and @rocketmail.
Hurry before someone else does!
http://mail. promotions. yahoo.com/ newdomains/ aa/

[Non-text portions of this message have been removed]

   


      Veja quais são os assuntos do momento no Yahoo! +Buscados
http://br.maisbuscados.yahoo.com

[Non-text portions of this message have been removed]

Reply | Threaded
Open this post in threaded view
|

Re: cvcanny error

Juan D'Amato
The source of the function cvCanny should be a 1-Channel image (frame is a
3-Channels image)

This is the right code
   frame2 = cvCreateImage( cvSize_( frame.width, frame.height),
IPL_DEPTH_8U, 1);
   cvCvtColor(frame,  frame2, CV_BGR2GRAY) ;
   cvCanny(  frame2,   frame2, 0.3, 0.8);

Regards

Juan

--
Ing. Juan P.D'Amato
Tel : 02293 - 439690
Instituto PLADEMA  - TANDIL
Web Site : www.pladema.net/~jpdamato/


[Non-text portions of this message have been removed]

Reply | Threaded
Open this post in threaded view
|

Re: cvcanny error

coskun kazma
it works thank you very muck

--- On Tue, 13/1/09, Juan D'Amato <[hidden email]> wrote:
From: Juan D'Amato <[hidden email]>
Subject: Re: [OpenCV] cvcanny error
To: [hidden email]
Date: Tuesday, 13 January, 2009, 5:50 PM










 






   
            The source of the function cvCanny should be a 1-Channel image (frame is a

3-Channels image)



This is the right code

   frame2 = cvCreateImage( cvSize_( frame.width, frame.height) ,

IPL_DEPTH_8U, 1);

   cvCvtColor(frame,  frame2, CV_BGR2GRAY) ;

   cvCanny(  frame2,   frame2, 0.3, 0.8);



Regards



Juan



--

Ing. Juan P.D'Amato

Tel : 02293 - 439690

Instituto PLADEMA  - TANDIL

Web Site : www.pladema. net/~jpdamato/



[Non-text portions of this message have been removed]




     

   
   
       
         
       
       




       




       
       


       
       
       




      Get your preferred Email name!
Now you can @ymail.com and @rocketmail.com.
http://mail.promotions.yahoo.com/newdomains/aa/

[Non-text portions of this message have been removed]

Reply | Threaded
Open this post in threaded view
|

Re: cvcanny error

coskun kazma
In reply to this post by Juan D'Amato
it works thank you very much

--- On Tue, 13/1/09, Juan D'Amato <[hidden email]> wrote:
From: Juan D'Amato <[hidden email]>
Subject: Re: [OpenCV] cvcanny error
To: [hidden email]
Date: Tuesday, 13 January, 2009, 5:50 PM










 






   
            The source of the function cvCanny should be a 1-Channel image (frame is a

3-Channels image)



This is the right code

   frame2 = cvCreateImage( cvSize_( frame.width, frame.height) ,

IPL_DEPTH_8U, 1);

   cvCvtColor(frame,  frame2, CV_BGR2GRAY) ;

   cvCanny(  frame2,   frame2, 0.3, 0.8);



Regards



Juan



--

Ing. Juan P.D'Amato

Tel : 02293 - 439690

Instituto PLADEMA  - TANDIL

Web Site : www.pladema. net/~jpdamato/



[Non-text portions of this message have been removed]




     

   
   
       
         
       
       




       




       
       


       
       
       




      Get your new Email address!
Grab the Email name you&#39;ve always wanted before someone else does!
http://mail.promotions.yahoo.com/newdomains/aa/

[Non-text portions of this message have been removed]

Reply | Threaded
Open this post in threaded view
|

Re: QLabel Slot

Xavier Delacour
In reply to this post by abdelhak mahmoudi
This question should be directed to the QT user group/list, not opencv.

Xavier

On Tue, Jan 13, 2009 at 11:21 AM, abdelhak mahmoudi <[hidden email]> wrote:

> Hi, please help!
> error message :Object::connect: No such slot
> QWidget::changerContenuLabel(m_label)
>
> #include "MaFenetre.h"
>
> MaFenetre::MaFenetre() : QWidget()
> {
> //Label
> int largeur = QImage("image.jpg").width();
> int hauteur = QImage("image.jpg").height();
> m_label = new QLabel(this);
> m_label->setGeometry(0,0,largeur, hauteur);
>
> // Boutton
> m_bouton = new QPushButton("Ok", this);
> m_bouton->setGeometry(largeur/2 - 60, hauteur+10, 120, 40);
> m_bouton->setFont(QFont("Comic Sans MS", 14));
> m_bouton->setCursor(Qt::PointingHandCursor);
>
> QObject::connect(
> m_bouton,
> SIGNAL(clicked()),
> this,
> SLOT(changerContenuLabel(m_label))
> );
> }
>
> void MaFenetre::changerContenuLabel(QLabel *label)
> {
> label->setPixmap(QPixmap::fromImage(QImage("image.jpg")));
> }
> //Where MaFenetre.h:
> #ifndef MAFENETRE_H_
> #define MAFENETRE_H_
>
> #include <QApplication>
> #include <QWidget>
> #include <QPushButton>
> #include <QLabel>
> #include <QPixmap>
> #include <QImage>
> #include <QSlider>
> #include <QLCDNumber>
>
> class MaFenetre : public QWidget
> {
> public:
> MaFenetre();
>
> public slots:
> void changerContenuLabel(QLabel *label);
>
> private:
>
> QPushButton *m_bouton;
> QLabel *m_label;
> /*QSlider *m_slider;
> QLCDNumber *m_lcd*/;
> };
> #endif /* MAFENETRE_H_ */
>
> ________________________________
>
> [Non-text portions of this message have been removed]
>
>