Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iPhone SDK 3.0 Camera Access

Could anyone advise on whether the iPhone SDK 3.0 still does not allow access to the raw camera pixel data

This is how it was with all the previous SDKs and I thought it must have been a move by Apple to ensure they were the first ones to implement the video recording. Since 3.0 now has video recording, and as far as im aware the situation remains the same, then evidently I was wrong.

What I am wondering is what is apple playing at? Why aren't they allowing us to write crazy super-cool augmented reality applications on the iPhone.

Any ideas?

like image 516
zenna Avatar asked Jun 18 '09 01:06

zenna


1 Answers

No, with SDK 3.0 and a new Iphone 3G S you can actually capture movies using the provide APIs. You are restricted to 10 minutes video.

In the UIImagePickerControllerDelegate, you can now find UIImagePickerControllerMediaType. This specifies the media type selected by the user. The value is an NSString object containing a type code such as kUTTypeImage or kUTTypeMovie.

This method has been added:

imagePickerController:didFinishPickingMediaWithInfo: Tells the delegate that the user picked an image or movie. This method is optional.

  • (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info

Parameters picker The controller object managing the image picker interface.

info A dictionary containing the original image and the edited image, if an image was picked; or a filesystem URL for the movie, if a movie was picked. The dictionary also contains any relevant editing information. The keys for this dictionary are listed in “Editing information keys.”

Discussion Your delegate object’s implementation of this method should pass the specified media on to any custom code that needs it and then dismiss the picker view.

When editing is enabled, the picker view presents the user with a preview of the currently selected image or movie along with controls for modifying it. (This behavior is managed by the picker view prior to calling this method.) If the user modifies the image or movie, the editing information is available in the info parameter. The original image is also returned in the info parameter.

Maximum movie duration is 10 minutes. If a user picks a movie that is longer in duration than 10 minutes, they are forced to trim it before saving it.

Implementation of this method is optional, but expected.

Availability Available in iPhone OS 3.0b and later.

like image 100
Massimo Cafaro Avatar answered Oct 21 '22 00:10

Massimo Cafaro