Qt-interest Archive, April 2008
Image Manipulation using OpenGL
Message 1 in thread
Hi folks,
I need some image manipulation in my qt application. Some of the
features required are: Translate, Rotate, Scale, Blur, Sharpen,
Contrast, Red Eye Removal, Add Noise, Charcoal, Shadow, Sketch, Enhance,
Edge, Gamma, Implode, Negate, Flip, Flop, OilPaint etc to Image.
I tried with Image Magick but it seems to be very expensive in terms of
converting an image to Pixmap and vice versa. It is too heavy and also
not very easy to deploy.
I am now looking towards OpenGL. Is it possible to manipulate image
using OpenGL and where do I find the proper api reference for that?
Quick help is required.
Regards,
Manoj
--
[ signature omitted ]
Message 2 in thread
Hi,
"Manoj Agrawal" <manoj.a@xxxxxxxxxxx> wrote in message
news:fthk20$8bq$1@xxxxxxxxxxxxxxxx
> I need some image manipulation in my qt application. Some of the features
> required are: Translate, Rotate, Scale, Blur, Sharpen, Contrast,
...these are pretty standard, and should be no big problem with any
manipulation method you choose.
> Red Eye Removal, Add Noise, Charcoal, Shadow, Sketch, Enhance, Edge,
> Gamma, Implode, Negate, Flip, Flop, OilPaint etc to Image.
But these are not. There are algorithms for them, but you will have to
either use them from a library or implement them yourself.
> I tried with Image Magick but it seems to be very expensive in terms of
> converting an image to Pixmap and vice versa. It is too heavy and also not
> very easy to deploy.
It is fairly heavy, but it can do all you want and is actively maintained.
> I am now looking towards OpenGL. Is it possible to manipulate image using
> OpenGL and where do I find the proper api reference for that?
Sure it is possible. Especially the standard things are relatively easy.
However, implementing red eye removal yourself is a challenge. The API
reference can be found with a tiny amount of googling, so finding that I'll
leave as an excercise to the reader.
In your case, I'd stick probably stick to something like ImageMagick.
> Quick help is required.
For whom? Maybe you should read
http://catb.org/~esr/faqs/smart-questions.html before you say something like
that.
Good luck!
André
--
[ signature omitted ]
Message 3 in thread
Hello Andre,
Thank you very much for your time and reply.
André Somers wrote:
> Hi,
>
> "Manoj Agrawal" <manoj.a@xxxxxxxxxxx> wrote in message
> news:fthk20$8bq$1@xxxxxxxxxxxxxxxx
>> I need some image manipulation in my qt application. Some of the
>> features required are: Translate, Rotate, Scale, Blur, Sharpen, Contrast,
> ...these are pretty standard, and should be no big problem with any
> manipulation method you choose.
>
>> Red Eye Removal, Add Noise, Charcoal, Shadow, Sketch, Enhance, Edge,
>> Gamma, Implode, Negate, Flip, Flop, OilPaint etc to Image.
> But these are not. There are algorithms for them, but you will have to
> either use them from a library or implement them yourself.
>
>> I tried with Image Magick but it seems to be very expensive in terms
>> of converting an image to Pixmap and vice versa. It is too heavy and
>> also not very easy to deploy.
> It is fairly heavy, but it can do all you want and is actively maintained.
>
>> I am now looking towards OpenGL. Is it possible to manipulate image
>> using OpenGL and where do I find the proper api reference for that?
> Sure it is possible. Especially the standard things are relatively easy.
> However, implementing red eye removal yourself is a challenge. The API
> reference can be found with a tiny amount of googling, so finding that
> I'll leave as an excercise to the reader.
I tried to do the same and did not find a proper reference to the
features I need. I found the following two useful URLs but they also
don't list the image manipulation methods I need. May be, I need to
implement those manipulation functions using the methods given here.
http://glprogramming.com/blue/ and
http://www.opengl.org/sdk/docs/man/
>
>
> In your case, I'd stick probably stick to something like ImageMagick.
>
>> Quick help is required.
> For whom? Maybe you should read
> http://catb.org/~esr/faqs/smart-questions.html before you say something
> like that.
I am great full for your advice. Please try not to be too harsh with
aspirants next time.
Regards,
Manoj
--
[ signature omitted ]
Message 4 in thread
Hi,
>> However, implementing red eye removal yourself is a challenge. The API
>> reference can be found with a tiny amount of googling, so finding that
>> I'll leave as an excercise to the reader.
> I tried to do the same and did not find a proper reference to the features
> I need. I found the following two useful URLs but they also don't list the
> image manipulation methods I need. May be, I need to implement those
> manipulation functions using the methods given here.
Yes, that was what I was saying. OpenGL tutorials and API documention
themselves are easy to find however. You are right that they do not give a
straitforward answer on how to implement red eye reduction and the like.
These are just not standard in the API, and thus not documented there.
>>> Quick help is required.
>> For whom? Maybe you should read
>> http://catb.org/~esr/faqs/smart-questions.html before you say something
>> like that.
> I am great full for your advice. Please try not to be too harsh with
> aspirants next time.
I wasn't trying to be harsh with you, and I don't think it is harsh to point
someone to a FAQ on how to ask questions in a forum/list/group like this. In
the long run, it can only help you. In this case, I was responding to the
"Quick help is required." sentence. I find that quite rude, to be honest.
Why is your question more important or should have a higher priority than
another question? So, a more specific link to the FAQ on this topic:
http://catb.org/~esr/faqs/smart-questions.html#urgent
Yours,
Andreé
--
[ signature omitted ]
Message 5 in thread
> >>> Quick help is required.
> >> For whom? Maybe you should read
> >> http://catb.org/~esr/faqs/smart-questions.html before you
> say something
> >> like that.
> > I am great full for your advice. Please try not to be too
> harsh with
> > aspirants next time.
> I wasn't trying to be harsh with you, and I don't think it is
> harsh to point
> someone to a FAQ on how to ask questions in a
> forum/list/group like this. In
> the long run, it can only help you. In this case, I was
> responding to the
> "Quick help is required." sentence. I find that quite rude,
> to be honest.
> Why is your question more important or should have a higher
> priority than
> another question? So, a more specific link to the FAQ on this topic:
> http://catb.org/~esr/faqs/smart-questions.html#urgent
I can only agree with Andree.
And i can't resist to point you to http://catb.org/~esr/faqs/smart-questions.html#forum as well:
This question is off-topic here, because this list is about Qt. While Qt might support OpenGL, your question is clearly unrelated to Qt.
Cheers,
Peter
--
[ signature omitted ]
Message 6 in thread
Peter Prade wrote:
>>>>> Quick help is required.
>>>> For whom? Maybe you should read
>>>> http://catb.org/~esr/faqs/smart-questions.html before you
>> say something
>>>> like that.
>>> I am great full for your advice. Please try not to be too
>> harsh with
>>> aspirants next time.
>> I wasn't trying to be harsh with you, and I don't think it is
>> harsh to point
>> someone to a FAQ on how to ask questions in a
>> forum/list/group like this. In
>> the long run, it can only help you. In this case, I was
>> responding to the
>> "Quick help is required." sentence. I find that quite rude,
>> to be honest.
>> Why is your question more important or should have a higher
>> priority than
>> another question? So, a more specific link to the FAQ on this topic:
>> http://catb.org/~esr/faqs/smart-questions.html#urgent
>
> I can only agree with Andree.
>
> And i can't resist to point you to http://catb.org/~esr/faqs/smart-questions.html#forum as well:
> This question is off-topic here, because this list is about Qt. While Qt might support OpenGL, your question is clearly unrelated to Qt.
>
> Cheers,
> Peter
I also completely agree with Andree and have no reservations in learning
new things or improving my self. I welcome his advice and I have already
read the FAQ pointed by him now. The only thing is that it appeared
somewhat harsh to me at first glance and I made it clear. But still
there is no doubt that everyone has a scope to be better than best. :-)
Apart from this, I am quite new to GPU and trying to learn about the
same. I have found some stuff on google but not sure how to use GPU with
image processing library. If you guys be kind enough to give me some
pointers, it will be a great help.
Thanks and Regards,
Manoj
>
> --
> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with "unsubscribe" in the subject or the body.
> List archive and information: http://lists.trolltech.com/qt-interest/
--
[ signature omitted ]
Message 7 in thread
On Wed, 09 Apr 2008 05:53:13 -0400, Andrà Somers <andre@xxxxxxxxxxxxxxxx>
wrote:
>>> For whom? Maybe you should read
>>> http://catb.org/~esr/faqs/smart-questions.html before you say
>>> something like that.
>> I am great full for your advice. Please try not to be too harsh with
>> aspirants next time.
> I wasn't trying to be harsh with you, and I don't think it is harsh to
> point someone to a FAQ on how to ask questions in a forum/list/group
> like this. In the long run, it can only help you. In this case, I was
> responding to the "Quick help is required." sentence. I find that quite
> rude, to be honest. Why is your question more important or should have a
> higher priority than another question? So, a more specific link to the
> FAQ on this topic:
> http://catb.org/~esr/faqs/smart-questions.html#urgent
>
Well, the word 'required' was not a good choice, but english is not his
native language. He wrote great full instead of grateful for example.
Sometimes things doesn't translate very well and sound odd, in my case I
always have to think twice before posting to avoid these misunderstandings.
--
[ signature omitted ]
Message 8 in thread
On Wednesday 09 April 2008 07:26:16 Manoj Agrawal wrote:
> Hi folks,
>
> I need some image manipulation in my qt application. Some of the
> features required are: Translate, Rotate, Scale, Blur, Sharpen,
> Contrast, Red Eye Removal, Add Noise, Charcoal, Shadow, Sketch, Enhance,
> Edge, Gamma, Implode, Negate, Flip, Flop, OilPaint etc to Image.
>
> I tried with Image Magick but it seems to be very expensive in terms of
> converting an image to Pixmap and vice versa. It is too heavy and also
> not very easy to deploy.
>
> I am now looking towards OpenGL. Is it possible to manipulate image
> using OpenGL and where do I find the proper api reference for that?
Hello Mano. Using the GPU for such tasks is good, but the OpenGL API is not
what you're looking for.
Such tasks require other APIs, like GLSL (the OpenGL Shading Language, that
lies over OpenGL), CG (NVDIA's Shaders, with their own shading language
compiler), or you can even look at NVIDIA's CUDA (a framework for doing raw
processing with the GPU).
However whatever GPU processing api you choose doesn't have the algorithms
you're asking as "builtin", they must be compiled and loaded on the graphics
board like if they were standard CPU programs (only in a different language).
In the end, the GPU may help you doing such tasks but you have to either
write 'effects' by yourself or, better, find a library with those algorithms
already implemented, debugged, and ready to go.
If you decide to stay on the CPU for those, you can look at Blitz, a
foundation of the KDE4 desktop (/trunk/kdesupport/qimageblitz on KDE SVN) or
at extending Zack's supreme Quasar framework (trunk/playground/base/quasar)
that is the most promising solution for your problem, but still doesn't suit
all your needs.
Regards,
Enrico
> Quick help is required.
>
> Regards,
> Manoj
--
Email.it, the professional e-mail, gratis per te: http://www.email.it/f
Sponsor:
Ti vestiamo dalla testa ai piedi e anche sotto se lo vuoi ! Clicca su www.grandinettisport.com
*
Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=7502&d=9-4
--
[ signature omitted ]
Message 9 in thread
Thanks Enrico. Your answer is really very useful. After reading your
post, I feel that I might have to stay with Image Magick only as it has
all those image manipulation methods. The biggest problem is that it is
cpu expensive. I also had problems deploying it. I searched on web and
also posted forums for the same but with not much luck. Finding out the
dlls to be deployed from Image Magick is still a job for me to be done.
Anyways, thank you very much for your concern, and I will revert back as
soon as I get a final solution. I request you to give me some more
pointers regarding this, if you come across.
Enrico Ros wrote:
> On Wednesday 09 April 2008 07:26:16 Manoj Agrawal wrote:
>> Hi folks,
>>
>> I need some image manipulation in my qt application. Some of the
>> features required are: Translate, Rotate, Scale, Blur, Sharpen,
>> Contrast, Red Eye Removal, Add Noise, Charcoal, Shadow, Sketch, Enhance,
>> Edge, Gamma, Implode, Negate, Flip, Flop, OilPaint etc to Image.
>>
>> I tried with Image Magick but it seems to be very expensive in terms of
>> converting an image to Pixmap and vice versa. It is too heavy and also
>> not very easy to deploy.
>>
>> I am now looking towards OpenGL. Is it possible to manipulate image
>> using OpenGL and where do I find the proper api reference for that?
>
> Hello Mano. Using the GPU for such tasks is good, but the OpenGL API is not
> what you're looking for.
>
> Such tasks require other APIs, like GLSL (the OpenGL Shading Language, that
> lies over OpenGL), CG (NVDIA's Shaders, with their own shading language
> compiler), or you can even look at NVIDIA's CUDA (a framework for doing raw
> processing with the GPU).
>
> However whatever GPU processing api you choose doesn't have the algorithms
> you're asking as "builtin", they must be compiled and loaded on the graphics
> board like if they were standard CPU programs (only in a different language).
>
> In the end, the GPU may help you doing such tasks but you have to either
> write 'effects' by yourself or, better, find a library with those algorithms
> already implemented, debugged, and ready to go.
>
> If you decide to stay on the CPU for those, you can look at Blitz, a
> foundation of the KDE4 desktop (/trunk/kdesupport/qimageblitz on KDE SVN) or
> at extending Zack's supreme Quasar framework (trunk/playground/base/quasar)
> that is the most promising solution for your problem, but still doesn't suit
> all your needs.
>
> Regards,
> Enrico
>
>> Quick help is required.
>>
>> Regards,
>> Manoj
>
>
> --
> Email.it, the professional e-mail, gratis per te: http://www.email.it/f
>
> Sponsor:
> Ti vestiamo dalla testa ai piedi e anche sotto se lo vuoi ! Clicca su www.grandinettisport.com
> *
> Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=7502&d=9-4
>
> --
> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with "unsubscribe" in the subject or the body.
> List archive and information: http://lists.trolltech.com/qt-interest/
--
[ signature omitted ]
Message 10 in thread
On Apr 9, 2008, at 4:09 AM, Enrico Ros wrote:
>> I need some image manipulation in my qt application. Some of the
>> features required are: Translate, Rotate, Scale, Blur, Sharpen,
>> Contrast, Red Eye Removal, Add Noise, Charcoal, Shadow, Sketch,
>> Enhance,
>> Edge, Gamma, Implode, Negate, Flip, Flop, OilPaint etc to Image.
>>
>> I tried with Image Magick but it seems to be very expensive in
>> terms of
>> converting an image to Pixmap and vice versa. It is too heavy and
>> also
>> not very easy to deploy.
>>
>> I am now looking towards OpenGL. Is it possible to manipulate image
>> using OpenGL and where do I find the proper api reference for that?
>
> Hello Mano. Using the GPU for such tasks is good, but the OpenGL
> API is not
> what you're looking for.
>
> Such tasks require other APIs, like GLSL (the OpenGL Shading
> Language, that
> lies over OpenGL), CG (NVDIA's Shaders, with their own shading
> language
> compiler), or you can even look at NVIDIA's CUDA (a framework for
> doing raw
> processing with the GPU).
This is not necessarily true. The shading languages has nothing to do
with what Mano was looking to accomplish. You can do pretty much
everything he wants using textures, the accumulation buffer, and most
importantly, the Imaging Subset extension to the OpenGL standard.
Mano, check out a recent OpenGL book, such as the "OpenGL
Programmer's Guide, Fifth Edition". Chapter 8 deals with stuff you
are trying to do. IMO, you would be going down the wrong path by
trying to work with pixel shaders.
Brad
--
[ signature omitted ]