Grasshopper

algorithmic modeling for Rhino

Would appreciate any help on how i could pick up color intensity, from an image and translate the same into a 3 dimensional surface with parts of the surface displaced in the z axis as a response to color intensity (darker patches are displaced more than lighter one or vice versa...)

Views: 750

Replies to This Discussion

Colours are composed of RGB, somewhat like a point is composed of XYZ. Differences being Points can exist in limitless space with no minimum resolution, while colours can only exist between 0 and 255, and have a minimum increment value of 1, i.e. a colour can have an R value of 1 or 2, there's no 1.005. Well, there's alpha too, but thats a whole another matter.

If you want to measure the intensity on only one channel, then you need to measure your values on that channel (R/G/B) and then equate it to the Z value of your points in consideration. Say if we were sampling Red, R = 0 would mean no change to the Z position, and R = 255 would mean Z = 10. All other values between 0-255 would be interpolated to 0-10.

You could even sample all 3 simultaneously, and take only the highest. In that case, you will have to measure R, G and B, and take the maximum of the 3 for any given pt.

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service