- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have a set of 10 images that I need to run through a DMIP graph. I would like to have a loop that changes inputs and run "g.Execute()" 10 times. How to do this?
I tried to re-initialize SrcNode, but it wouldn't let me.
I hope I don't have to crate a new Graph for every iteration.
Thanks!
I tried to re-initialize SrcNode, but it wouldn't let me.
I hope I don't have to crate a new Graph for every iteration.
Thanks!
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - Goran N
I have a set of 10 images that I need to run through a DMIP graph. I would like to have a loop that changes inputs and run "g.Execute()" 10 times. How to do this?
I tried to re-initialize SrcNode, but it wouldn't let me.
I hope I don't have to crate a new Graph for every iteration.
Thanks!
I tried to re-initialize SrcNode, but it wouldn't let me.
I hope I don't have to crate a new Graph for every iteration.
Thanks!
Currently, the only way to do this is to copy new images into DMIP::Image object. Hope, that all your source images have the same parameters - i.e. data type/ width / height / number of channels - otherwise you will not be able to re-use graph, because during graph compilation all physical image dimensions are used in data calculations.
So, if all your inputs have the same dimensions, you can do the following:
- Create a source DMIP::Image object. Before object creation you'll need to allocate space for real image. Then in object constructor you'll specify the buffer parameters - e.g. Image(void* data, IppDataType type, IppChannels chan, IppiSize roi, int step, int top=0, int bot=0, int lef=0, int rig=0, bool inverserow=false)
- The above data pointer is the pointer where you can copy new source images to.
- After you compile the graph, in the loop, copy next source image from where you keep them to data pointer. Use ippiCopy functions for that.
- Execute method will create a destination image. The DMIP::DstNode has the similar DMIP::Image object with output data buffer pointer. You may copy destination image from there to wherever you want. Again, use ippiCopy.
Sergey
P.S. New versions of DMIP will have some specific methods to simplify DMIP usage in stream mode, when the graph is the same, but the data is changing.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page