this next problem. if wants add 2 cents...
have 3 dimensional data in 2-d image. transform 3-d image cube. code figures find in 2-d image data point in 3-d cube. need reverse follows: position in 2-d image go x pixels in 1 direction. figure out in 3-d cube data goes.
code:
for(lensx = 0; lensx < cubewidth; lensx++) { for(lensy = 0; lensy < cubewidth; lensy++) { if(lookuptable[lensx][lensy][2] > 0) { xref = lookuptable[lensx][lensy][0] + token.xshift; yref = lookuptable[lensx][lensy][1] + token.yshift; height = heightmap[lensy*cubewidth + lensx]; tilt = tiltmap[lensy*cubewidth + lensx]; vertscale = vert_scale_delta/height; for(w = 0; w < nchan; w++) { lambda = lambda_min + lambda_inc*w; crudexcntr = (int)lroundf(xref + (lambda_ref - lambda)/vertscale*tilt); crudeycntr = (int)lroundf(yref + (lambda_ref - lambda)/vertscale);
you need describe better, @ least me. have point on surface (or anywhere in volume?) of 3-d object project 2d space. want move 2d point , "reverse project" 3d object?
you'll have uniqueness problems projection function won't bijection. if constrain way in movement in 2d shape can change 3d point position, might able make work.
Forums Macs Mac Programming
- iPhone
- Mac OS & System Software
- iPad
- Apple Watch
- Notebooks
- iTunes
- Apple ID
- iCloud
- Desktop Computers
- Apple Music
- Professional Applications
- iPod
- iWork
- Apple TV
- iLife
- Wireless
No comments:
Post a Comment