PDA

View Full Version : Image processing question on performance



UKCitizen1423
9th April 2014, 16:25
Hi All,

Using QT 5

I am a newbie so please treat tenderly, only been using QT for a week ;)

I have a QGraphicsView + QGraphicsScene, I place a QGraphicsPixmapItem into the scene to manipulate Brightness, contrast, make grayscale, . . . using scanline a 4038 × 2596 pixel image adjusting the brightness takes approx 100ms on the system I have, a 2588 × 1958 takes approx 50ms obviously huge difference in number of pixels to run through. Impressive though!

Q: If I have a slider to manipulate the brightness then it will 'feel' sluggish to adjust for large images (expected 3000px x 3000px images). I have seen the posts that warn about threads on graphic items etc but I am a newbie so not fully aware of all the dangers. To give the 'live preview' of adjustment brightness using the slider I have thought about grabbing the visual part of the mainImage from the GraphicsScene, place that onto the scene, manipulate the brightness. On sliderReleased manipulate the mainImage and remove the previewImage. Does this seem feasible? Expected monitor resolutions are 1680px x 1050 so actual visual size of the scene will probably be a max of 1600 x 800 assuming full screen: that should run in order of 20ms on the previewImage. Note I can't really use Gimp or Photoshop approach of scanlines and threads or tiles and threads (long story but adjustments must appear to be instant).

If this is feasible what methods should I research / top level overview? I know there is a method of pixmap().toImage() but not sure about the scene. One other possible complication is that I will have QGraphicsItems on top of the image (polygons etc), I only need the section of the image.

If not feasible what other approach would you use?

QT documentation is excellent but obviously hard work for the complete newbie.

Thanks in advance.

peterlee
14th May 2014, 05:38
Hi, UKCitizen1423.
I am a newbie, too. Have you ever found out any solutions to your problem? I am looking for the way to process images. I wonder whether I need to ask some other 3rd party image processing (http://www.yiigo.com/guides/vbnet/how-to-process-image.shtml) toolkits for help? And is that more convenient to using the manual Imaging SDKs (http://www.yiigo.com/guides/csharp/) which can be customized by users according to our own favors? I am totally a green hand on this field. Any suggestion will be appreciated. Thanks in advance.



Best regards,
Peter