Hi wingusr, On Tuesday 02 November 2010, 20:56:35 TP wrote: > On Wed, Oct 27, 2010 at 2:39 PM, Hans-Peter Jansen <h...@urpla.net> wrote: > > On Tuesday 19 October 2010, 07:41:55 TP wrote: > >> I'm trying to write my first PyQt program. I eventually plan on > >> creating an open-source PyQt app that explores the use of various > >> image processing operations (using the Leptonica C library > >> http://www.leptonica.com as the underlying image processing > >> engine). > > > > Good luck. Looks like you need to wrap it before you leap. While I > > didn't dived into it too deeply, my guess is, that opencv might > > also be an interesting experimental image manipulation platform, > > that quite a few people would love to play with.. > > Oh, I've already done some "proof of concept" work. I've managed to > call various Leptonica functions from Python via ctypes. I am also > able to convert Leptonica's Pix structure to a QPixmap (via a > QImage). Therefore I can, for example, deskew a document page and > display it in a Qt Window without having to write a file to disk.
Since you managed access to Leptonica via ctypes, then wrapping it with sip won't be that big of a deal for you. > I'm > currently at the point where I have to make some tricky UI design > decisions. > > OpenCV is, I believe, more focused on Computer Vision than Leptonica. > My application will mainly be dealing with document image processing > so Leptonica is a better fit. It is also a "pedagogically-oriented > open source site" so it's website and commented C source code is > helpful when trying to learn document image processing techniques (I > haven't looked at opencv's source code so I don't know how readable > it is). Additionally, Leptonica is being used by the Tesseract OCR > project (http://code.google.com/p/tesseract-ocr/) which I also one > day hope to incorporate. Sounds interesting, indeed. [...] > >> As far as testing goes, I not sure how one goes about testing PyQt > >> GUI apps other than using them? I forgot to mention the QtTest module. > > That's another reason to look into dip. Phil is also doing some > > testing ;-) > > I spent a day or so reading the dip documentation. I think, for now, > using the entire framework is a bit too complex for my needs (the > final "Complete Example" made my head explode :P). I might, however, > use the dip.ui and dip.model stuff. My head exploded after looking into the source due to trying to resolve some issues... [...] > >> How can I specify NumPad /, NumPad *, and NumPad 5 as keyboard > >> shortcuts? > > > > You may get away with using some multimedia keyboard symbols, but I > > don't know any (portable) method to differentiate between Keypad / > > and the / key. David Boddie, do you? > > Googling around I see the question asked a number of times but no > definitive ansower so far. Well, looking into the code didn't revealed an answer, either. [...] > Thanks for all your input. I guess my original post just scared > people away since you were the only person to respond :( Sure, you did. > Now that I've published documentation at > http://tpgit.github.com/MDIImageViewer/index.html, maybe more people > would be inclined to look at the project at > http://github.com/tpgit/MDIImageViewer/ and comment? > > I may post to the Qt mailing list since the remaining issues aren't > really PyQt specific and they might have suggestions on the overall > design. As long as you don't expect as concise answers as you may yield here, go ahead ;-) Pete _______________________________________________ PyQt mailing list PyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt