I'm assigning the image size based on the predefined (for example) distance and image width & height. I referred these links: link1 link2
height_of_frame = ((obj_distance) * measured_object_height_in_mm / 1000.0))/focal;
width_of_frame = ((obj_distance) * measured_object_width_in_mm / 1000.0))/focal;
int imagesize_height = ((152.4)*1990/1000)/0.33;
int imagesize_width = ((152.4)*3500/1000)/0.33;
distance in cm = 152.4 and ipadMini camera focal length is 3.3mm = 0.33cm
But, if i do this it reducing the image size not close or near.
Imagesize based on aspect ratio:
CGFloat widthRatio = self.view.frame.size.width / enteredRoomSize.width;
CGFloat heightRatio = self.view.frame.size.height / enteredRoomSize.height;
CGSize imageSize = CGSizeMake(350 * widthRatio, 199 * widthRatio);
mmageView=[[UIImageView alloc]init];
CGRect frame = mmageView.frame; frame.size = imageSize; mmageView.frame = frame;