# structured_light **Repository Path**: xumingkun/structured_light ## Basic Information - **Project Name**: structured_light - **Description**: Generate and Decode structured light. - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 1 - **Created**: 2020-03-31 - **Last Updated**: 2022-03-10 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Structured Light These programs generate and decode structured light. Currently supports `Binary code`, `Gray code`, `XOR code`, `Unstructured light`, `Single spot` and `Single stripe`. ## Usage ### Export images The following example exports 256x180 gray code pattern images. ``` python gray.py 256 180 ``` ### Use as a module ```python import gray width = 1280 height = 800 imgs_posi = gray.generate(width, height, inverse=False) imgs_nega = gray.generate(width, height, inverse=True) #Projecting patterns from a projector #Capture images decode = gray.decode(imgs_posi, imgs_nega) print(decode) ```