Description of the component
The ShapeDiverImageSampler component works similarly to the standard grasshopper ImageSampler, except the local input file is replaced by a Grasshopper Bitmap.
Example definition: Import and Sample Images
Download the definition from the first example here.
Applications
The Image Sampler allows Grasshopper to analyze images and use them to influence geometrical algorithms for example. Using Squid along the Image Sampler, one can also re-process input images and export them from Grasshopper and the ShapeDiver viewer.
Component reference
- Component name: ShapeDiverImageSampler
- Default Nickname: SDImageSampler
- Inputs:
Name | ID | Description | Type |
---|---|---|---|
Bitmap | B | Image a Grasshopper Bitmap to sample. | Grasshopper Bitmap |
Coordinates | C | Pixel coordinates and X (width) and Y (height) directions. | Point |
Domain | D | Domain used to sample the image (see details below). | Domain² |
If the domain is left unspecified, it defaults to [1, pixel width] x [1, pixel height].
It can be changed to any other 2D domain, typically [0,1]x[0,1]
for unitized pixel coordinates. The Coordinates parameter needs to be given according the specified Domain.
- Outputs:
Name | ID | Description | Type |
---|---|---|---|
Color | C | Pixel color at the (X,Y) location. | Color |
Comments
0 comments
Article is closed for comments.