Grasshopper

algorithmic modeling for Rhino

A question for you!

How to sort pixel values of an image
and then groups the color values?

Many thanks.

Views: 2767

Replies to This Discussion

Hi,

maybe this way... ?

Best,

Raul

Attachments:
Dear Raul,

your definition shows me this.
Is that right? I have not worked for a long time with Grasshopper,
Would it be possible for you to make your answer a little more detail?


Thank you!

try this one (you need a jpg, png or bmp image)

Attachments:

Dear Raul,


Thank you for your quick response!
For example, if I take this image of Barak Obama,
I would have with your definition following response?

 

What does this means?

"Floating parameter image failed to collect data"

 

And how to grouped different color values?

Attachments:

That means: the component has no image.

Also in my example you don't need the "Image Sampler" Component.

You have to right klick "F" and choose "Set one File Path". Then you must set the Path to your picture (like "C:\....bla.jpg")

Please let me know if it works.

My PC is not able to open the "barack_obama_2.jpg" as you suggest it.

any idea?

maybe the image is too big

For my example i got this one

Attachments:

Is it not possible to equip your definition with more horsepower? :D

I need more color value.

sorry but i have no other idea. The "IMG" and "DeMesh" components are the bottleneck.

Ugh! Its the C# component

ok,

i try to make the pict very smal,

and it work! :D

so now the next question:

how to groupe the (similar) color value?

Attachments:

the files!

Attachments:

Im a bit confused because i just fill a list...

private void RunScript(List<Color> C, ref object A)
  {
    List<Color> myColorList = new List<Color>();

    foreach (var my_color in C)
    {
      if (!myColorList.Contains(my_color))
      {
        myColorList.Add(my_color);
      }
    }

    A = myColorList;
  }

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service