Results 1 to 4 of 4

Thread: Receiving Image through serial port in QT

  1. #1
    Join Date
    Jan 2013
    Location
    Bangalore, India
    Posts
    36
    Thanks
    9
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Question Receiving Image through serial port in QT

    Hi everyone,

    I created an image processing GUI in Qt with openCV, where I opened an image from specific path and processed it. Now I am planning to implement like getting an image from serial port and send that image for further processing. I don't have any idea in doing this,. Any help will be appreciated!

    void finalv1:penimage()
    {
    QString filename=QFileDialog::getOpenFileName(this,tr("Loa d Image"),".",tr("Image Files(*.png *.jpg *.jpeg *.bmp)"));
    imageop = cvLoadImage(filename.toAscii().data());
    cvNamedWindow("image",1);
    cvShowImage("image",imageop);
    }

    void finalv1:n_pushButton_open_clicked()
    {
    openimage();
    }

    I provided my code for opening an image and the image is an 'IplImage*'.

    Thanx!

  2. #2
    Join Date
    Mar 2011
    Location
    Hyderabad, India
    Posts
    1,882
    Thanks
    3
    Thanked 452 Times in 435 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows
    Wiki edits
    15

    Default Re: Receiving Image through serial port in QT

    Do you already have a serial port access lib, if not select one first. This post lists some useful links

    http://www.qtcentre.org/threads/5294...l-port-library

    Then using one the library get the file from serial port, save it on disk, and open it as usual.
    When you know how to do it then you may do it wrong.
    When you don't know how to do it then it is not that you may do it wrong but you may not do it right.

  3. #3
    Join Date
    Jan 2013
    Location
    Bangalore, India
    Posts
    36
    Thanks
    9
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Receiving Image through serial port in QT

    Hi Santosh,

    Is it mandatory to have Qextserialport or some other library to do serial communication in Qt? can't we write in C++ directly without having those libraries?

    thanx

  4. #4
    Join Date
    Mar 2011
    Location
    Hyderabad, India
    Posts
    1,882
    Thanks
    3
    Thanked 452 Times in 435 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows
    Wiki edits
    15

    Default Re: Receiving Image through serial port in QT

    You can always write using native OS APIs.
    When you know how to do it then you may do it wrong.
    When you don't know how to do it then it is not that you may do it wrong but you may not do it right.

  5. The following user says thank you to Santosh Reddy for this useful post:

    jakr13 (4th February 2013)

Similar Threads

  1. serial port issues
    By jhowland in forum Qt Programming
    Replies: 7
    Last Post: 12th January 2009, 14:38
  2. Serial Port
    By b1 in forum Qt Programming
    Replies: 2
    Last Post: 18th January 2007, 03:05
  3. serial port and USB communication
    By shamik in forum Qt Programming
    Replies: 5
    Last Post: 4th December 2006, 11:40
  4. Serial Port access in Qt
    By Doug Broadwell in forum Newbie
    Replies: 1
    Last Post: 30th November 2006, 10:45
  5. Serial Port Communication
    By soldstatic in forum Qt Programming
    Replies: 6
    Last Post: 22nd June 2006, 17:05

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.