Re: Cocoa Graphics Parsing
On 21 Jul 2009, at 03:50, Courtney Arnold wrote: Hello all, I need to programmatically parse/read through the contents of an NSImage. I am unable to find a tutorial or documentation that would explain how to do so. I would like to get some input on where I may be able to search for this information. thank you, since you want to scan barcode, by Googling I found, among other things, this: http://www.bruji.com/cocoa/barcode.html They have a barcode scanner project, written in Cocoa. The code is available for free. Klaus ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Cocoa Graphics Parsing
From: Courtney Arnold court...@rnolds.com Subject: Re: Cocoa Graphics Parsing To: cocoa-dev@lists.apple.com Date: Monday, 2009 July 20, 21:25 I am expecting that I am going to have to drop down to lower levels. I want to be able to manually parse an image of a UPC barcode. I assume that the best way to do so would be to potentially examine each single pixel. any information that you provide, I would appreciate it. Yes, it boils down to mincing along, examining each pixel. Do a search on syntactic pattern recognition. That was the title of the class in which we covered such things. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Cocoa Graphics Parsing
On 21 Jul 2009, at 04:05, Graham Cox wrote: Internally, you have -getPixel:atX:y: which would presumably be the workhorse at the heart of your class. -getPixel:atX:y: is fine for the odd what-colour-is-this test, but it's the wrong thing to use for any kind of intensive pixel access. For a task such as barcode recognition you would probably want to drop down and access the bits directly yourself. Of course, that means getting involved with pixel formats... Kind regards, Alastair. -- http://alastairs-place.net ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Cocoa Graphics Parsing
On 21/07/2009, at 11:50 AM, Courtney Arnold wrote: I need to programmatically parse/read through the contents of an NSImage. I am unable to find a tutorial or documentation that would explain how to do so. I would like to get some input on where I may be able to search for this information. Possibly because your question doesn't make much sense. What do you mean by Parse through. NSImage consists of one or more NSImageReps, each of those contains an image in a different format. Typically this would be a bitmap image which consists of blocks of pixels, but it could also be a PDF image that contains postscript. So what sort of image data are you talking about, and what do you mean by parse? --Graham ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Cocoa Graphics Parsing
I am expecting that I am going to have to drop down to lower levels. I want to be able to manually parse an image of a UPC barcode. I assume that the best way to do so would be to potentially examine each single pixel. any information that you provide, I would appreciate it. On Jul 20, 2009, at 7:51 PM, I. Savant wrote: On Jul 20, 2009, at 9:50 PM, Courtney Arnold wrote: I need to programmatically parse/read through the contents of an NSImage. I am unable to find a tutorial or documentation that would explain how to do so. I would like to get some input on where I may be able to search for this information. That depends on what you mean by parse/read through. Exactly what are you trying to do? What kinds of images (raster, vector)? Does it have to be NSImage or are you willing to drop to a lower level? -- I.S. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Cocoa Graphics Parsing
Hi Courtney, Two resources that you might consider are the Quartz-dev mailing list and Programming with Quartz by David Gelphman. HTH, Joel ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Cocoa Graphics Parsing
On 21/07/2009, at 12:25 PM, Courtney Arnold wrote: I am expecting that I am going to have to drop down to lower levels. I want to be able to manually parse an image of a UPC barcode. I assume that the best way to do so would be to potentially examine each single pixel. any information that you provide, I would appreciate it. Well, if you're looking for -getBarcode: from NSImage, you're obviously out of luck. All you can do is scan the pixels, that's all that's in there, NSImage and NSImageRep do not interpret the content beyond pixels. However, you could do this by subclassing NSImageRep (or NSBitmapImageRep) and adding methods that do interpret barcodes at this level. You still have to do the work but this approach would give you a nice high-level interface to it. Internally, you have -getPixel:atX:y: which would presumably be the workhorse at the heart of your class. --Graham ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Cocoa Graphics Parsing
On Jul 20, 2009, at 7:25 PM, Courtney Arnold wrote: I want to be able to manually parse an image of a UPC barcode. That's not parsing, that's image recognition. There's a rather extensive academic literature on the subject. -jcr ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Cocoa Graphics Parsing
On 21/07/2009, at 12:25 PM, Courtney Arnold wrote: I am expecting that I am going to have to drop down to lower levels. I want to be able to manually parse an image of a UPC barcode. I assume that the best way to do so would be to potentially examine each single pixel. As others have pointed out, just examining each pixel is very far from being able to detect a barcode. You are going to have to do some work. You might want to have a look at this project: http://sourceforge.net/projects/osxrecognition/ -- Rob Keniger ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com