Results 1 to 8 of 8

Thread: getRow() function implementation - QLuminanceSorce (zxing)

  1. #1
    Join Date
    Apr 2011
    Posts
    12
    Qt products
    Qt4
    Platforms
    Windows

    Default getRow() function implementation - QLuminanceSorce (zxing)

    Hi All,

    We are building a decoder application on Symbian which uses zxing.
    We need to port the app from zxing 1.5 to 1.6 (due to slow performance in decoding data matrix on 1.5).

    We are facing a number of issues mentioned below:
    1. From 1.5 to 1.6 prototypes of certain functions that we were using have changed.
    - getPixel() of LuminanceSource has been replaced by getRow().
    If there is any getRow() implementation avaialable, please share the same.

    2. There is an implementation of a derived class GreyscaleLuminanceSource in zxing 1.6 that inherits LuminaneSource, which in turn implements getRow().
    The constructor of GreyscaleLuminanceSource class takes unsigned char* greyData as a parameter which is supposedly the image data.

    3. Another problem is how can we get this data from QImage that is being captured by camera in our application.
    Is there a working code to get the data of Qimage using scanLine Qt library function?


    Thanks,
    Kush

  2. #2
    Join Date
    Apr 2011
    Posts
    12
    Qt products
    Qt4
    Platforms
    Windows

    Default scanLine to get the greyData of QImage

    Hi all,

    Is there a way to get the image data from QImage using scanLine function.

    Can any one share the code.


    Many Thanks,
    Kush

  3. #3
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows
    Thanks
    21
    Thanked 418 Times in 411 Posts

    Default Re: getRow() function implementation - QLuminanceSorce (zxing)

    We are facing a number of issues mentioned below:
    1. From 1.5 to 1.6 prototypes of certain functions that we were using have changed.
    - getPixel() of LuminanceSource has been replaced by getRow().
    If there is any getRow() implementation avaialable, please share the same.

    2. There is an implementation of a derived class GreyscaleLuminanceSource in zxing 1.6 that inherits LuminaneSource, which in turn implements getRow().
    The constructor of GreyscaleLuminanceSource class takes unsigned char* greyData as a parameter which is supposedly the image data.
    What does this have to do with Qt?

    3. Another problem is how can we get this data from QImage that is being captured by camera in our application.
    Is there a working code to get the data of Qimage using scanLine Qt library function?
    Did you even look at the QImage doc before asking here?
    QImage::constScanLine() makes sense to me.
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  4. #4
    Join Date
    Apr 2011
    Posts
    12
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: getRow() function implementation - QLuminanceSorce (zxing)

    What does this have to do with Qt?
    - We are building an application on QT Creator so thought may be QT community can be a help.

    Did you even look at the QImage doc before asking here?
    QImage::constScanLine() makes sense to me.
    - Any programmer will do that and I did it as well. In the question itself i had asked is there a working code (example) that uses scanLine method of QT Library?

    It was just a humble post as we are stuck up in the middle and was extecting to get some positive replies.


    Any ways thanks for letting me know that I have posted this at a wrong place.

    - Kush

  5. #5
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows
    Thanks
    21
    Thanked 418 Times in 411 Posts

    Default Re: getRow() function implementation - QLuminanceSorce (zxing)

    - We are building an application on QT Creator so thought may be QT community can be a help.
    Well, if you would develop this on MSVC would you post this on an MSVC forum too?
    The two first questions have nothing to do with Qt - just because you are using Qt Creator as an IDE.
    Did you even look at the QImage doc before asking here?
    QImage::constScanLine() makes sense to me.
    - Any programmer will do that and I did it as well. In the question itself i had asked is there a working code (example) that uses scanLine method of QT Library?
    You will be surprosed how many do NOT look first at the docs!
    In any case, what working code are you looking for?
    You call QImage::constScanLine() and you get a pointer to the scan line - and that is what you asked for.
    If there is something which is not clear to you, you should explain what that is, as none of us is has psychic powers to read you mind.

    It was just a humble post as we are stuck up in the middle and was extecting to get some positive replies.
    If you want positive replies, make sure you post clear questions, that are on topic!

    Any ways thanks for letting me know that I have posted this at a wrong place.
    For Qt related questions this is the right place.
    But more than the wrong place your post should be more explicit and on topic.

    For non Qt related issue we have a 'General Programming' section.

    P.S
    Multi posting doesn't help you case either.
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  6. #6
    Join Date
    Apr 2011
    Posts
    12
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: getRow() function implementation - QLuminanceSorce (zxing)

    The QImage::constScanLine(int i)/ QImage::scanLine(int i) function as per the library returns the pixel data at the scanline with index i.

    What our requirement is we want to call scanLine for all the lines that are present in the QImage image.
    It requires a loop to go through each line and repeatedly call scanLine for all the lines of QImage.

    What we are looking for is a code example that gathers all the data from all the lines using scanLine function.


    Any help regarding this would be highly appreciated.

    Also, I would try to be more clear and not offend any ones sentiments by posting non-QT related issues under proper section.


    Thanks,
    Kush

  7. #7
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows
    Thanks
    21
    Thanked 418 Times in 411 Posts

    Default Re: getRow() function implementation - QLuminanceSorce (zxing)

    What our requirement is we want to call scanLine for all the lines that are present in the QImage image.
    It requires a loop to go through each line and repeatedly call scanLine for all the lines of QImage.

    What we are looking for is a code example that gathers all the data from all the lines using scanLine function.
    What do you mean with gather?
    The data is gathered IN the QImage, so just gathering it again wont bring much.
    I guess you want to preform some operation on the line data?

    You just wrote in words that you need a loop that will call scanLine() for each line of the image.
    If you know what for() statement is, than where is the problem to translate that in to code?

    Qt Code:
    1. for(int i=0; i <m_pImage->height(); i++)
    2. {
    3. doSomeWorkOnTheDataFunc( m_pImage->scanLine(i) );
    4. }
    To copy to clipboard, switch view to plain text mode 
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  8. #8
    Join Date
    Apr 2011
    Posts
    12
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: getRow() function implementation - QLuminanceSorce (zxing)

    Actually the requirement is that we collect the image data in unisigned char*

Similar Threads

  1. QRCode Reader in Qt using ZXing
    By codeN in forum Qt Programming
    Replies: 5
    Last Post: 3rd January 2014, 04:55
  2. Cannot write a function pointer into a class implementation
    By tonnot in forum General Programming
    Replies: 7
    Last Post: 18th April 2011, 21:22
  3. Replies: 3
    Last Post: 25th May 2010, 09:46
  4. Replies: 0
    Last Post: 10th March 2010, 08:13

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
  •  
Qt is a trademark of The Qt Company.