Grasshopper

algorithmic modeling for Rhino

How do RGB values converts to Numbers in the Image Sampler ?

Hi guys,


The direct output of the Image Sampler are RGB values, how do the three values get converted into one number when pluging the output into a number component ? Could that be a greyscale value ?

 

It'd be great if the image sampler could have an input and output on which one could hover and see the information similarly to other GH components.


cheers,


Arthur

 

Views: 4192

Replies to This Discussion

Hi Arthur,

double-click the image sampler to switch from colour sampling to other modes:


The last one in that list is the brightness sampling.

--
David Rutten
david@mcneel.com
Poprad, Slovakia
Thanks a lot David.
Anyone would know what the "interpolate" does by any chance ?
cheers
Without interpolate, the sampler only looks at the pixel directly underneath the sampling coordinate. With interpolate on, it will also take neighbouring pixels into account when you're sampling 'in between' pixels.

--
David Rutten
david@mcneel.com
Poprad, Slovakia
Thanks David !

Sorry for being a bit demanding, do you think there could be a contrast slider in the image sampler or even as a separate component ? Contrast is the main thing I have been changing in photoshop to get better results it d be fantastic if it was directly into GH (my colleagues agree).

thanks again,

Arthur
Try to connect the image sampler (brightness) output to a graph mapper and try different graph types, beginning with the linear.

___________
Ola Jaensson
Hi Arthur,

I can add all manner of pixel post-processing effects to the image sampler, I've already coded them up in Grasshopper. But wouldn't it make more sense to add contrast to your values after you get them out of the sampler?

--
David Rutten
david@mcneel.com
Poprad, Slovakia
Hi David,

I guess the good thing about putting it in the image sampler is being able to visualize the modifications on the image but as Ola mentionned, putting a parabolic graph after the sampler will probably do the job :)
Ok, I have about 20* or so pixel filters coded up for GUI purposes, but there's no reason why wouldn't work on large images as well. I'll need to figure out a good way to provide a UI for this though.

--
David Rutten
david@mcneel.com
Poprad, Slovakia


* though probably only about 10 or so useful ones for this purpose.

Hi David, 

When Arthur plugged the image sampler into the number component the rgb value was converted into a single number. What is the conversion equation used to obtain these values?

Thank you

Joey Doherty

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service