Skip to content

Calibration for the iPad Pro Ultrawide camera #103

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions RealityMixer/Calibration/Model/CalibrationResult.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ extension CalibrationResult {
<opencv_storage>
<camera_id>1</camera_id>
<camera_name>Reality Mixer Camera</camera_name>
<image_width>\(imageSize.width)</image_width>
<image_height>\(imageSize.height)</image_height>
<image_width>1920</image_width>
<image_height>1080</image_height>
<camera_matrix type_id="opencv-matrix">
<rows>3</rows>
<cols>3</cols>
<dt>d</dt>
<data>\(camera.m11.scientific) \(camera.m21.scientific) \(camera.m31.scientific) \(camera.m12.scientific) \(camera.m22.scientific) \(camera.m32.scientific) \(camera.m13.scientific) \(camera.m23.scientific) \(camera.m33.scientific)</data>
<data>7.667418047615e+2 0e+0 9.6e+2 0e+0 7.667418047615e+2 5.4e+2 0e+0 0e+0 1e+0</data>
</camera_matrix>
<distortion_coefficients type_id="opencv-matrix">
<rows>8</rows>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="18122" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="19455" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina4_0" orientation="landscape" appearance="light"/>
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="18093"/>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="19454"/>
<capability name="Image references" minToolsVersion="12.0"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/>
Expand Down Expand Up @@ -36,10 +37,10 @@
<rect key="frame" x="0.0" y="0.0" width="568" height="288"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="pdd-Db-gt8">
<rect key="frame" x="0.0" y="0.0" width="568" height="706.5"/>
<rect key="frame" x="0.0" y="0.0" width="568" height="692.5"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="20" translatesAutoresizingMaskIntoConstraints="NO" id="RiB-QT-Baj">
<rect key="frame" x="34" y="40" width="500" height="626.5"/>
<rect key="frame" x="34" y="40" width="500" height="612.5"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="62H-A8-eMS">
<rect key="frame" x="0.0" y="0.0" width="500" height="52.5"/>
Expand Down Expand Up @@ -84,9 +85,15 @@
</subviews>
</stackView>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="4" translatesAutoresizingMaskIntoConstraints="NO" id="zYM-9B-WeW">
<rect key="frame" x="0.0" y="72.5" width="500" height="31"/>
<rect key="frame" x="0.0" y="72.5" width="500" height="17"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="Nah-Fu-nAj">
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Ultrawide calibration" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ajl-si-qh6">
<rect key="frame" x="0.0" y="0.0" width="500" height="17"/>
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/>
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
</label>
<stackView hidden="YES" opaque="NO" contentMode="scaleToFill" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="Nah-Fu-nAj">
<rect key="frame" x="0.0" y="0.0" width="500" height="31"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Resolution scale factor" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="2pl-Fn-h2s">
Expand Down Expand Up @@ -140,7 +147,7 @@
</subviews>
</stackView>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Khk-NM-EnK">
<rect key="frame" x="0.0" y="123.5" width="500" height="40"/>
<rect key="frame" x="0.0" y="109.5" width="500" height="40"/>
<color key="backgroundColor" white="0.10000000000000001" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="height" constant="40" id="Viw-rX-eGM"/>
Expand All @@ -159,7 +166,7 @@
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="65x-Yf-f7P">
<rect key="frame" x="0.0" y="183.5" width="500" height="40"/>
<rect key="frame" x="0.0" y="169.5" width="500" height="40"/>
<color key="backgroundColor" white="0.10000000000000001" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="height" constant="40" id="N1n-XW-VHd"/>
Expand All @@ -178,7 +185,7 @@
</connections>
</button>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="20" translatesAutoresizingMaskIntoConstraints="NO" id="HjO-92-aht">
<rect key="frame" x="0.0" y="243.5" width="500" height="235"/>
<rect key="frame" x="0.0" y="229.5" width="500" height="235"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="tnd-2p-K2r">
<rect key="frame" x="0.0" y="0.0" width="500" height="1"/>
Expand Down Expand Up @@ -246,7 +253,7 @@
</subviews>
</stackView>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="8Hb-dK-cSB">
<rect key="frame" x="0.0" y="498.5" width="500" height="128"/>
<rect key="frame" x="0.0" y="484.5" width="500" height="128"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="height" constant="128" id="GQ1-Tb-dbu"/>
Expand Down