loading
 
Translate with Variables?
John from United States  [2 posts]
10 years
RR,

I am having a lot of fun playing with a DC Missile Launcher with my camera attached to it and I am trying to write a good face tracking program but I am stuck in a spot.

Is it in the plans to allow the Translate module and the other Transforms to allow for variables rather than just integers? Or is there another way I could complete the following task?

More or less, I am trying to get just the contents of the COG box to appear, but within its original location (as opposed to a crop of just the contents at a new image size).
The plan right now is:
-Marker [original]

-Movement 30
-Center of Gravity

-Marker [] (revert to original)
-VBScript (to calculate the proper xmin,xmax,ymin,ymax for crop based off of COG_SIZE and COG x,y)
-Crop [xmin],[ymin] - [xmax],[ymax]

-Marker [cog_crop] (revert to original)
-Mosaic (with just [cog_crop] to build a new 320x240 image with [cog_crop] in lower left)

{here is where I would love for translate to accept a variable}
-Translate [COG_X], [COG_Y]

this would allow the image on the mosaic to translate the X and Y values from COG making what would appear to be a dynamic translation of the cropped COG box over the original image size. (I know the mosaic part is a little shifty to obtain my results but hey I am only a few days into learning the program!)

Keep up the great work!

--John
program.robo
Anonymous 10 years
John,

Yes, the idea is to allow for most modules to use the [variable] notation to access variable amounts but we end up doing this on a need to use basis. We've updated the translate module to accept [x] as a value. Please download v1.7.14.1 to get this change. If there are others you need updated please just let us know and we'll get on it asap.

STeven.
John from United States  [2 posts] 10 years
STeven,

Thanks so much for getting an update together for me. Translate function works great. I will have to let you know how it works out for me when I get the chance to work out the kinks of my program.

Thanks again, keep up the good work!

--John
Anonymous 10 years
Good work for both of you.

Thanks


program.robo

This forum thread has been closed due to inactivity (more than 4 months) or number of replies (more than 50 messages). Please start a New Post and enter a new forum thread with the appropriate title.

 New Post   Forum Index