Welcome Guest! You need to login or register to make posts.

Notification

Icon
Error

Options
Go to last post Go to first unread
rawsonl  
#1 Posted : Wednesday, May 21, 2008 4:11:58 AM(UTC)
rawsonl

Rank: Member

Groups: Member
Joined: 8/15/2007(UTC)
Posts: 14

I have a requirement to take a bitmap and divide it into thirds horizontally. Then count the most frequently used color in each third and compare the results.

How would I go about doing that?

Thanks,

Linda Rawson

Alex Kon  
#2 Posted : Wednesday, May 21, 2008 8:43:36 PM(UTC)
Alex Kon

Rank: Advanced Member

Groups: Member
Joined: 1/31/2005(UTC)
Posts: 458

Was thanked: 5 time(s) in 5 post(s)
Hello Linda,

Could you provide me with more details about the task? How large are your files? Which pixel formats should be processed? Do you need some sort of color averaging or just pure frequence counting (for example, usual photos in most cases contain very large count of different colors, so straight counting will be senseless)?

The simplest way is to count pixels in straight for loop using Aurigma.GraphicsMill.Bitmap.GetPixel(...) method. It returns Color class instance so you can easily determine values of its components and register it in some way in your application. It is not the fastest way, but if I don't know additional conditions of your task, I cannot suggest you any specific method.

Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.