Please don't start multiple threads on the same subject. Threads merged.
Please don't start multiple threads on the same subject. Threads merged.
So the problem is your camera :]
The most important part of image processing is image acquisition. Even the best algorithms can't help you if the image quality is poor. And I don't mean only resolution, but also colors, lights which means generaly a quality of the whole scene you make a picture of. Next thing is that the light sensitive matrix (or how the hell is it called in english) in your camera is not the one that will give you the quality you want (generally those megapixels are some kind of cheat because 1 pixel can measure only 1 color (red, gree, blue) so to have color pixels camera needs 2x2 square where it takes 2 green pixels, 1 red, 1 blue and uses interpolation to get RGB values of each pixel).
So what you can do is a technique which was advised on Qt Labs: if you want to scale some image to for example a little bit less than 1/2 of original resolution, then scale it to 1/2 (which is fast and nice for an obvous reasons :] - take every second row and then every second pixel in thise rows) with a fast transformation and then use smooth transformation to get the final ratio.
I you scale down an image without smoothing you may have aliasing (see image processing theory) and the grid I see on images makes me think you have aliasing !
The more your original image has noise, the more aliasing could be a problem. Try to smooth (filter) the image before scaling.
I don't think so. Aliasing can only occur in diagonal directions. What we see here looks more like interlace or something like that. If you scale by 1/2, 1/4, etc. the interlace will go away because all the "interlaced" lines will be discarded. Where the interlace-like effect comes from? I have no idea, probably the data aquisition process was incorrect (format conversion can be treated as part of the aquisition as well). If QImage::scaled() was not working, the effect would be noticable on the whole area of the photo and not only in some special conditions.
o... didn't check your previous code but I see thats the thing I mentioned above with those cameras :] but didn't think you have to do it by yourself ;]
this problem is true for my other camera chips, like ov5620 which producted by OV ..
Last edited by wesley; 20th April 2010 at 11:02.
Can you replicate it with some arbitrary image downloaded from the Web?
But did you do the same conversion you have been doing for your image?
Well, obviously QImage::scaled() works in general so you don't have to check that. Find a raw image, convert it using your routine (to test your routine) and then pass it through QImage::scaled() to see if you obtain a similar effect.
Bookmarks