• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Best class for pixel-level image processing?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Best class for pixel-level image processing?


  • Subject: Re: Best class for pixel-level image processing?
  • From: Trygve Inda <email@hidden>
  • Date: Fri, 12 Feb 2010 08:00:06 +0000
  • Thread-topic: Best class for pixel-level image processing?

> I am writing an application that wants to perform some basic computer vision
> computation, and I want a class that offers pixel-level access to an image.
> What would be the best way to approach this?
>

Do something like:

MyImageRep =

[[NSBitmapImageRep alloc] initWithBitmapDataPlanes:NULL
                          pixelsWide:pixelsWide
                          pixelsHigh:pixelsHigh
                          bitsPerSample:8
                          samplesPerPixel:4
                          hasAlpha:YES
                          isPlanar:NO
                          colorSpaceName:NSDeviceRGBColorSpace
                          bitmapFormat:NSAlphaFirstBitmapFormat
                          bytesPerRow:pixelsWide * 4
                          bitsPerPixel:32];

And later:

[NSGraphicsContext setCurrentContext:[NSGraphicsContext
graphicsContextWithBitmapImageRep:myImageRep]];


and:

[myImageRep representationUsingType:NSJPEGFileType properties:imageProps];


This should get you started.

Trygve


_______________________________________________

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

References: 
 >Best class for pixel-level image processing? (From: Alexander Golec <email@hidden>)

  • Prev by Date: Re: What classes have -init?
  • Next by Date: Re: get the list of controls in a NSView
  • Previous by thread: Best class for pixel-level image processing?
  • Next by thread: Re: Best class for pixel-level image processing?
  • Index(es):
    • Date
    • Thread