I need to take multiple images and “blend” them together into a final image
on the fly using PhAB. I have been working with PtMakeTransparent to put an
image on top of another within a label. However, this isn’t going to work
as the number of images to be “blended” is dynamic.
Any ideas?
TIA,
Kit
Hmmm. Not a pretty task. But try this:
Create your separate images via whatever
Create an empty image
Iterate through a loop that will read the pixel in each source image and
create an “average” pixel in the final image.
Display your final image.
“Kit Plummer” <kp@sip.vme.com> wrote in message
news:ajtpbk$1j7$1@inn.qnx.com…
I need to take multiple images and “blend” them together into a final
image
on the fly using PhAB. I have been working with PtMakeTransparent to put
an
image on top of another within a label. However, this isn’t going to work
as the number of images to be “blended” is dynamic.
Any ideas?
TIA,
Kit
Bill Caroselli (Q-TPS) wrote:
It ain’t fun.
Start by reading and memorizing the docs on PhImage. Load some simple
images and look at all of the data with a debugger.
One way.
IMHO it’s easier to use the new Pi* functions for it though, more
specifically, the PiSetPixel and PiGetPixel.
/Johan Björk - phearbear
Good luck.
“Kit Plummer” <> kp@sip.vme.com> > wrote in message
news:ak0h46$2oc$> 1@inn.qnx.com> …
Bill,
Thanks. Yeh, I was thinking your way might be a step in the right
direction…
What is the best way to read the pixels from an image?
Kit
“Bill Caroselli (Q-TPS)” <> QTPS@EarthLink.net> > wrote in message
news:ajtu87$570$> 1@inn.qnx.com> …
Hmmm. Not a pretty task. But try this:
Create your separate images via whatever
Create an empty image
Iterate through a loop that will read the pixel in each source image and
create an “average” pixel in the final image.
Display your final image.
“Kit Plummer” <> kp@sip.vme.com> > wrote in message
news:ajtpbk$1j7$> 1@inn.qnx.com> …
I need to take multiple images and “blend” them together into a final
image
on the fly using PhAB. I have been working with PtMakeTransparent to
put
an
image on top of another within a label. However, this isn’t going to
work
as the number of images to be “blended” is dynamic.
Any ideas?
TIA,
Kit
\
Bill,
Thanks. Yeh, I was thinking your way might be a step in the right
direction…
What is the best way to read the pixels from an image?
Kit
“Bill Caroselli (Q-TPS)” <QTPS@EarthLink.net> wrote in message
news:ajtu87$570$1@inn.qnx.com…
Hmmm. Not a pretty task. But try this:
Create your separate images via whatever
Create an empty image
Iterate through a loop that will read the pixel in each source image and
create an “average” pixel in the final image.
Display your final image.
“Kit Plummer” <> kp@sip.vme.com> > wrote in message
news:ajtpbk$1j7$> 1@inn.qnx.com> …
I need to take multiple images and “blend” them together into a final
image
on the fly using PhAB. I have been working with PtMakeTransparent to
put
an
image on top of another within a label. However, this isn’t going to
work
as the number of images to be “blended” is dynamic.
Any ideas?
TIA,
Kit
\
It ain’t fun.
Start by reading and memorizing the docs on PhImage. Load some simple
images and look at all of the data with a debugger.
Good luck.
“Kit Plummer” <kp@sip.vme.com> wrote in message
news:ak0h46$2oc$1@inn.qnx.com…
Bill,
Thanks. Yeh, I was thinking your way might be a step in the right
direction…
What is the best way to read the pixels from an image?
Kit
“Bill Caroselli (Q-TPS)” <> QTPS@EarthLink.net> > wrote in message
news:ajtu87$570$> 1@inn.qnx.com> …
Hmmm. Not a pretty task. But try this:
Create your separate images via whatever
Create an empty image
Iterate through a loop that will read the pixel in each source image and
create an “average” pixel in the final image.
Display your final image.
“Kit Plummer” <> kp@sip.vme.com> > wrote in message
news:ajtpbk$1j7$> 1@inn.qnx.com> …
I need to take multiple images and “blend” them together into a final
image
on the fly using PhAB. I have been working with PtMakeTransparent to
put
an
image on top of another within a label. However, this isn’t going to
work
as the number of images to be “blended” is dynamic.
Any ideas?
TIA,
Kit
\
OK. I didn’t know about them.
“phearbear” <phearbear@home.se> wrote in message
news:3D62E051.7010707@home.se…
Bill Caroselli (Q-TPS) wrote:
It ain’t fun.
Start by reading and memorizing the docs on PhImage. Load some simple
images and look at all of the data with a debugger.
One way.
IMHO it’s easier to use the new Pi* functions for it though, more
specifically, the PiSetPixel and PiGetPixel.
/Johan Björk - phearbear
Good luck.
“Kit Plummer” <> kp@sip.vme.com> > wrote in message
news:ak0h46$2oc$> 1@inn.qnx.com> …
Bill,
Thanks. Yeh, I was thinking your way might be a step in the right
direction…
What is the best way to read the pixels from an image?
Kit
“Bill Caroselli (Q-TPS)” <> QTPS@EarthLink.net> > wrote in message
news:ajtu87$570$> 1@inn.qnx.com> …
Hmmm. Not a pretty task. But try this:
Create your separate images via whatever
Create an empty image
Iterate through a loop that will read the pixel in each source image
and
create an “average” pixel in the final image.
Display your final image.
“Kit Plummer” <> kp@sip.vme.com> > wrote in message
news:ajtpbk$1j7$> 1@inn.qnx.com> …
I need to take multiple images and “blend” them together into a final
image
on the fly using PhAB. I have been working with PtMakeTransparent to
put
an
image on top of another within a label. However, this isn’t going to
work
as the number of images to be “blended” is dynamic.
Any ideas?
TIA,
Kit
\
“Bill Caroselli (Q-TPS)” <QTPS@earthlink.net> wrote:
It ain’t fun.
Sure it is!
Start by reading and memorizing the docs on PhImage. Load some simple
images and look at all of the data with a debugger.
Also, look in the free area in www.parse.com; there are a few programs
there that deal with cross-fading and other effects… These diddle
the PhImage structures heavily for image processing…
Cheers,
-RK
Good luck.
“Kit Plummer” <> kp@sip.vme.com> > wrote in message
news:ak0h46$2oc$> 1@inn.qnx.com> …
Bill,
Thanks. Yeh, I was thinking your way might be a step in the right
direction…
What is the best way to read the pixels from an image?
Kit
“Bill Caroselli (Q-TPS)” <> QTPS@EarthLink.net> > wrote in message
news:ajtu87$570$> 1@inn.qnx.com> …
Hmmm. Not a pretty task. But try this:
Create your separate images via whatever
Create an empty image
Iterate through a loop that will read the pixel in each source image and
create an “average” pixel in the final image.
Display your final image.
“Kit Plummer” <> kp@sip.vme.com> > wrote in message
news:ajtpbk$1j7$> 1@inn.qnx.com> …
I need to take multiple images and “blend” them together into a final
image
on the fly using PhAB. I have been working with PtMakeTransparent to
put
an
image on top of another within a label. However, this isn’t going to
work
as the number of images to be “blended” is dynamic.
Any ideas?
TIA,
Kit
\
–
Robert Krten, PARSE Software Devices +1 613 599 8316.
Realtime Systems Architecture, Books, Video-based and Instructor-led
Training and Consulting at www.parse.com.
Email my initials at parse dot com.
Kit,
One possible solution might be to draw all images you want to combine into a
memory context and then flush the memory context into a new image.
e.g. You could try something like this:
// create an image big enough to hold the final result
PhImage_t* blended_image = PhCreateImage( … )
// create a memory context to draw in
PmMemoryContext_t* mc = PmMemCreateMC( blended_image , … )
// switch to memory context
PmMemStart( mc )
// draw images on top of each other
PgDrawPhImagemx( pos1, image1, 0 )
PgDrawPhImagemx( pos2, image2, 0 )
…
// flush context to image
PgFlush( )
PmMemFlush( mc, blended_image )
// switch back to display
PmMemStop( mc )
// free memory context
PmMemReleaseMC( mc )
// done, blended_image now contains the blended image
You can look up the PmMem* functions in helpviewer for more info…
-Chris