Calculating average colour of clusters

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Calculating average colour of clusters

james
Administrator
Hi,

I have segmented objects into clusters, and have been working on calculating the average RGB values for each cluster (which I will convert to HSV values later).
I am not quite sure how I can access the colour information only within XYZRGBA clusters.
Can anyone point me in the right direction?

Thanks,
James
Reply | Threaded
Open this post in threaded view
|

Re: Calculating average colour of clusters

koen buys-2
On 28 June 2012 05:20, james <[hidden email]> wrote:
> Hi,
>
> I have segmented objects into clusters, and have been working on calculating
> the average RGB values for each cluster (which I will convert to HSV values
> later).

why don't you do the conversion first?

> I am not quite sure how I can access the colour information only within
> XYZRGBA clusters.
> Can anyone point me in the right direction?
>
> Thanks,
> James
>
> --
> View this message in context: http://www.pcl-users.org/Calculating-average-colour-of-clusters-tp4019779.html
> Sent from the Point Cloud Library (PCL) Users mailing list archive at Nabble.com.
> _______________________________________________
> [hidden email] / http://pointclouds.org
> http://pointclouds.org/mailman/listinfo/pcl-users
_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users
Reply | Threaded
Open this post in threaded view
|

Re: Calculating average colour of clusters

james
Administrator
I wouldn't be opposed to doing that, but I am unsure of how I should be referencing the colour value only for the cluster points only.
Reply | Threaded
Open this post in threaded view
|

Re: Calculating average colour of clusters

koen buys-2
I'm currently working with the label field to identify my clusters.
Further more I need something identical, I'm writing a colorhistogram
implementation for each of these clusters which is hue based.

Koen

On 28 June 2012 07:07, james <[hidden email]> wrote:
> I wouldn't be opposed to doing that, but I am unsure of how I should be
> referencing the colour value only for the cluster points only.
>
> --
> View this message in context: http://www.pcl-users.org/Calculating-average-colour-of-clusters-tp4019779p4019781.html
> Sent from the Point Cloud Library (PCL) Users mailing list archive at Nabble.com.
> _______________________________________________
> [hidden email] / http://pointclouds.org
> http://pointclouds.org/mailman/listinfo/pcl-users
_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users
Reply | Threaded
Open this post in threaded view
|

Re: Calculating average colour of clusters

james
Administrator
Thanks for the input. I ended up using getRGBVector3i() in order to access the colour information.
HSV conversion is done according to the function described here: http://www.deadbeef.com/converting_rgb_to_hsv_in_c/
Reply | Threaded
Open this post in threaded view
|

Re: Calculating average colour of clusters

koen buys-2
On 3 July 2012 03:36, james <[hidden email]> wrote:
> Thanks for the input. I ended up using getRGBVector3i() in order to access
> the colour information.
> HSV conversion is done according to the function described here:
> http://www.deadbeef.com/converting_rgb_to_hsv_in_c/
>

Note that PCL also provides the conversion methods as an API call from
pcl/common/point_type_conversions.h
You don't need to implement this yourself.

Koen

> --
> View this message in context: http://www.pcl-users.org/Calculating-average-colour-of-clusters-tp4019779p4019907.html
> Sent from the Point Cloud Library (PCL) Users mailing list archive at Nabble.com.
> _______________________________________________
> [hidden email] / http://pointclouds.org
> http://pointclouds.org/mailman/listinfo/pcl-users
_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users