@@ -230,7 +230,7 @@ void UI::ShowMainMenuBar(Window& window) {
230230			ImGui::MenuItem (" Scene Info"  , nullptr , &showSceneInfo);
231231			ImGui::MenuItem (" Camera Info"  , nullptr , &showCameraInfoDialog);
232232			ImGui::MenuItem (" Camera Controls"  , nullptr , &showCameraControls);
233- 			ImGui::MenuItem (" Selection Controls "  , nullptr , &showSelectionControls );
233+ 			ImGui::MenuItem (" Selection Dialog "  , nullptr , &showSelectionDialog );
234234			ImGui::MenuItem (" Render Settings"  , nullptr , &showRenderSettings);
235235			ImGui::MenuItem (" Performance Overlay"  , nullptr , &showPerformanceOverlay);
236236			ImGui::MenuItem (" Viewport Overlay"  , nullptr , &showViewportOverlay);
@@ -376,6 +376,10 @@ void UI::ShowCameraControls(Window& window) {
376376			window.RequestRedraw ();
377377		if  (ImGui::IsItemHovered ())
378378			ImGui::SetTooltip (" Toggle camera frustum display (C key)"  );
379+ 		if  (ImGui::SliderFloat (" Camera Size"  , &window.cameraSize , 0 .0001f , 0 .1f , " %.4f"  ))
380+ 			window.GetRenderer ().UploadCameras (window);
381+ 		if  (ImGui::IsItemHovered ())
382+ 			ImGui::SetTooltip (" Adjust camera size"  );
379383
380384		//  Arcball sensitivity controls (only show when in arcball mode)
381385		if  (window.GetControlMode () == Window::CONTROL_ARCBALL) {
@@ -828,6 +832,7 @@ void UI::ShowHelpDialog() {
828832		ImGui::Text ("   Single click        Select point/face/camera"  );
829833		ImGui::Text ("   Double-click        Focus on selection"  );
830834		ImGui::Text ("                       (or enter camera view for cameras)"  );
835+ 		ImGui::Text ("   Selection Dialog    Select point/face/camera by index"  );
831836		ImGui::Separator ();
832837
833838		//  Selection Tools
@@ -1065,6 +1070,24 @@ void UI::ShowCameraInfoDialog(Window& window) {
10651070				window.selectedNeighborCamera  == NO_ID ? " NA"   : String::FormatString (" %.2f"  , R2D (ACOS (ComputeAngle (
10661071					mvs_scene.images [images[window.selectionIdx ].idx ].camera .Direction ().ptr (),
10671072					mvs_scene.images [images[window.selectedNeighborCamera ].idx ].camera .Direction ().ptr ())))).c_str ());
1073+ 			if  (window.selectedNeighborCamera  != NO_ID && window.selectionType  == Window::SEL_CAMERA) {
1074+ 				//  Compute and display relative pose if a neighbor camera is selected
1075+ 				const  Image& mainView = images[window.selectionIdx ];
1076+ 				const  Image& neighView = images[window.selectedNeighborCamera ];
1077+ 				const  MVS::Camera& camMain = mvs_scene.images [mainView.idx ].camera ;
1078+ 				const  MVS::Camera& camNeigh = mvs_scene.images [neighView.idx ].camera ;
1079+ 				RMatrix poseR;
1080+ 				CMatrix poseC;
1081+ 				ComputeRelativePose (camMain.R , camMain.C , camNeigh.R , camNeigh.C , poseR, poseC);
1082+ 				Point3 eulerAngles;
1083+ 				poseR.GetRotationAnglesZYX (eulerAngles.x , eulerAngles.y , eulerAngles.z );
1084+ 				ImGui::Separator ();
1085+ 				ImGui::Text (" Relative Pose (Neighbor wrt Main)"  );
1086+ 				ImGui::Text ("   Position: %.3g, %.3g, %.3g (%.3g distance)"  ,
1087+ 					poseC.x , poseC.y , poseC.z , norm (poseC));
1088+ 				ImGui::Text ("   Rotation (ZYX): %.1f°, %.1f°, %.1f°"  ,
1089+ 					R2D (eulerAngles.x ), R2D (eulerAngles.y ), R2D (eulerAngles.z ));
1090+ 			}
10681091			if  (!imageData.neighbors .empty ()) {
10691092				//  Create a scrollable region for the neighbors list
10701093				ImGui::BeginChild (" NeighborsScrollRegion"  , ImVec2 (0 , 220 ), true , ImGuiWindowFlags_HorizontalScrollbar);
@@ -1520,7 +1543,7 @@ void UI::ShowSelectionOverlay(const Window& window) {
15201543					ImGui::Text ("   image size: %ux%u"  , imageData.width , imageData.height );
15211544					ImGui::Text ("   intrinsics: fx %.1f, fy %.1f"  , camera.K (0 , 0 ), camera.K (1 , 1 ));
15221545					ImGui::Text ("              cx %.1f, cy %.1f"  , camera.K (0 , 2 ), camera.K (1 , 2 ));
1523- 					ImGui::Text ("   position: %.3f , %.3f , %.3f "  , camera.C .x , camera.C .y , camera.C .z );
1546+ 					ImGui::Text ("   position: %.3g , %.3g , %.3g "  , camera.C .x , camera.C .y , camera.C .z );
15241547					ImGui::Text ("   rotation: %.1f°, %.1f°, %.1f°"  , 
15251548						R2D (eulerAngles.x ), R2D (eulerAngles.y ), R2D (eulerAngles.z ));
15261549					ImGui::Text ("   avg depth: %.2g"  , imageData.avgDepth );
@@ -1684,6 +1707,9 @@ void SettingsReadLine(ImGuiContext*, ImGuiSettingsHandler* handler, void* entry,
16841707	else  if  (sscanf (line, " ClearColor=%f,%f,%f,%f"  , &x, &y, &z, &w) == 4 ) {
16851708		window.clearColor  = Eigen::Vector4f (x, y, z, w);
16861709	}
1710+ 	else  if  (sscanf (line, " CameraSize=%f"  , &x) == 1 ) {
1711+ 		window.cameraSize  = x;
1712+ 	}
16871713	else  if  (sscanf (line, " PointSize=%f"  , &x) == 1 ) {
16881714		window.pointSize  = x;
16891715	}
@@ -1729,6 +1755,7 @@ void SettingsWriteAll(ImGuiContext*, ImGuiSettingsHandler* handler, ImGuiTextBuf
17291755	buf->appendf (" ClearColor=%f,%f,%f,%f\n "  , 
17301756		window.clearColor [0 ], window.clearColor [1 ], 
17311757		window.clearColor [2 ], window.clearColor [3 ]);
1758+ 	buf->appendf (" CameraSize=%f\n "  , window.cameraSize );
17321759	buf->appendf (" PointSize=%f\n "  , window.pointSize );
17331760	buf->appendf (" EstimateSfMNormals=%d\n "  , 
17341761		window.GetScene ().estimateSfMNormals  ? 1  : 0 );
0 commit comments