1
사진에서 물체를 측정하는 방법이 필요합니다 ... 나는 물체와 크기를 비교하기 위해 물체와 카드의 크기를 비교할 수는 있지만 이걸 어떻게 비교할 지 모르겠다 ... 어떤 생각? 여기카메라로 물체의 크기를 측정하십시오.
내가 어떤 IOS있는 사이트가 사진 여기
- (IBAction)takePicture:(id)sender {
// Create image picker controller
UIImagePickerController *imagePicker = [[UIImagePickerController alloc] init];
// Set source to the camera
imagePicker.sourceType = UIImagePickerControllerSourceTypeCamera;
// Delegate is self
imagePicker.delegate = self;
// Allow editing of image ?
imagePicker.allowsImageEditing = NO;
// Show image picker
[self presentModalViewController:imagePicker animated:YES];
}
- (void)image:(UIImage *)image didFinishSavingWithError:(NSError *)error contextInfo:(void *)contextInfo
{
UIAlertView *alert;
// Unable to save the image
if (error)
alert = [[UIAlertView alloc] initWithTitle:@"Error"
message:@"Unable to save image to Photo Album."
delegate:self cancelButtonTitle:@"Ok"
otherButtonTitles:nil];
else // All is well
alert = [[UIAlertView alloc] initWithTitle:@"Success"
message:@"Image saved to Photo Album."
delegate:self cancelButtonTitle:@"Ok"
otherButtonTitles:nil];
[alert show];
[alert release];
}
표시 한 코드는 이미지 선택기를 호출하는 방법입니다. 그것은 당신의 질문과 어떤 관련이 있습니까? –
예,이 이미지를 가져 와서 정의 된 영역에서 너비와 높이를 가져와야합니다. – Ladessa
올바르게 이해하면이 영역을 식별하고 크기를 가져 와서 일부 실제 세계로 변환하기 위해 일부 이미지 처리를 수행해야합니다. 조치. –