Re: Fastest color detection in image?
Re: Fastest color detection in image?
- Subject: Re: Fastest color detection in image?
- From: chaitanya pandit <email@hidden>
- Date: Fri, 26 Sep 2008 21:48:19 +0530
Well, there are 2 ways you can do it first would be to use:
NSReadPixel(apoint);
This method requires you to lock focus on the image before u call it.
You would have to iterate through every point in the image and get
it's color.
But i found that this is a bit slow, to make it a bit faster you can
create an NSBitmapImageRep
use [ImageRep colorAtX:apoint.x y:apoint.y] on that to get the values
of color at each point, this method doesn't need a lock focus to be
called on it, and its faster than the previous method i mentioned.
Perhaps if anyone knows about a faster way to do things i'd like to
know as well.
hth,
Chaitanya
On 26-Sep-08, at 7:34 PM, Christian Klotz wrote:
Hi,
I'm trying to scan an image for existence of a given color. So I was
wondering what the most performing way is to achieve this goal.
Basically I want to find out which amount of the given color that
image has.
Furthermore, are there ways to find all regions of the image having
the color? So it would be easy to show the user which parts of the
image are matching.
Really appreciating any help on this.
Thanks
Christian
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden