algorithm - Structured Light - How to do when the projector's resolution is lower than patterns? -


i try build structured light environment 3d scanning.

as far know, if choose use gray code reconstruct 3d model, have implement specific patterns encode in power 2(2^x, x = 0 ~ 10).

enter image description here

that said, patterns must @ least 1024 x 1024 in resolution.

what if dlp projector support resolution 800 x 480? projects moire pattern when gray code pattern resolution becomes high(i tried). should do?

my friends suggest create 1024 x 1024 patterns, , "crop" them 800 x 480,

but thought gray code should follow specific sequence , patterns, friends suggestion create several image not symmetry.

does have same experience me?

----------2015.8.4 update question----------

i thinking if projector can't projects high resolution patterns, can let projects patterns low resolution, instance, 2^0 2^6?

or gray code strictly demands patterns 2^0 2^10? otherwise gray code not available?

you can not directly scale down resolution

because distort pattern make useless

instead can:

  1. crop resolution

    but need handle in scanning part because not have full pattern available

  2. use nearest usable power of 2 resolution

    like 512x256 , create pattern it. rest of space unused (wasting pixels) 512x256

  3. use bullet #2 + scale fit resolution better

    so create pattern 512x256 , linearly scale fit 800x480 as can so:

    800/512 = 1.5625 480/256 = 1.8750 

    use smaller scale (512x256 * 1.5625 -> 800x400) scale pattern 1.5625 , use pattern image

    800x400

    this scaled nearest neighbor avoid subpixel grayscale colors harder detect. this waste less pixels can lower precision of 3d scan !!!

this how generate pattern in c++ , vcl:

// [generate pattern xs*ys power of 2 resolution] // clear buffer bmp->canvas->brush->color=clblack; bmp->canvas->fillrect(trect(0,0,xs,ys)); int x,y,a,da; (da=0;1<<da<xs;da++);                   // number of bits per x resolution (a=0,y=0;y<ys;y++,a=(y*da)/ys)  (x=0;x<xs;x++)   if (int((x>>a)&1)==0) pyx[ys-1-y][x]=0x00ffffff; bmp->savetofile("3d_scann_pattern0.bmp"); 
  • bmp vcl bitmap
  • xs,ys resolution of bitmap
  • p[ys][xs] direct 32bit pixel access bitmap

this slight differently encoded pattern !!!

[notes]

  • if need precision use bullet #2
  • if need cover bigger area use bullet #3
  • you can scale in y axis differently in x axis 1d encoding

Comments

Popular posts from this blog

python - Healpy: From Data to Healpix map -

c - Bitwise operation with (signed) enum value -

xslt - Unnest parent nodes by child node -