Results 1 to 2 of 2

Thread: how to plot a histogram for various images displayed in a imageviewer

  1. #1
    Join Date
    Aug 2015
    Posts
    2
    Thanks
    1
    Qt products
    Platforms
    Windows

    Default how to plot a histogram for various images displayed in a imageviewer

    hello frns
    i am displaying an image in a image viewer using qlabel . now i want to plot histogram for the displayed image in the imageviewr .Below is the attached code I have made which is not working and gives the following error
    img = cv2.imread(self.lbl,0)
    TypeError: expected string or Unicode object, QLabel found

    I know I am passing Qlabel and its expecting string or unicode object. But, I don't know how to resolve this issue. Please can anyone tell me what to do or If you have better solution please put forward.

    P.S: I am using PyQt4 and OpenCV and python 2.7
    plzz help me to get out of this.
    Attached Files Attached Files
    Last edited by ishani; 12th August 2015 at 07:41.

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,420
    Thanks
    37
    Thanked 1,545 Times in 1,495 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: how to plot a histogram for various images displayed in a imageviewer

    Well, when using an API, you have to check the requirement so of that API.

    Maybe that function requires a filename of an image?

    Cheers,
    _

  3. The following user says thank you to anda_skoa for this useful post:

    ishani (13th August 2015)

Similar Threads

  1. How to plot 3D histogram?
    By uestcmy in forum Qwt
    Replies: 0
    Last Post: 11th August 2013, 04:00
  2. Replies: 0
    Last Post: 9th November 2010, 07:58
  3. Replies: 0
    Last Post: 2nd August 2010, 11:17
  4. gif formate images is not displayed in linux
    By addu in forum Qt Programming
    Replies: 2
    Last Post: 11th November 2009, 06:37
  5. Images/icons. It's not displayed
    By LMZ in forum Qt Tools
    Replies: 37
    Last Post: 18th May 2007, 14:55

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.