01 Why extract source images from raw data
Exporting a PortalCam scan through LCC Studio gives you 3DGS, a point cloud, and a LiDAR mesh. That covers most of what you need for video production, but there are cases where you separately want the 4K images from the camera itself, as captured while walking the site. There are two use cases 3DGS alone can't cover.
- Using them as AI reference material — real 4K photographic images give noticeably better precision than a 3DGS render when used as reference for background fixes or generative AI.
- Trying 3D reconstruction through a different pipeline — it's worth checking whether the same field-captured data can be reused for methods other than 3DGS, such as photogrammetry (later in this article, we'll be honest about what we found when we actually tried this).
PortalCam's LCC Studio does have a GUI feature for exporting images, but this article uses a method that never opens the GUI and works entirely through CLI tools, since that's easier to fold into batch processing and automation.
02 What's inside a PortalCam scan's output
Before extraction, it helps to know what's inside the folder PortalCam creates for a single scan. Under ShotData/<scan name>/, the layout roughly looks like this.
ShotData/<scan name>/
├─ 2026-XX-XX-XXXXXX.xbin # Raw sensor recording (images + LiDAR + IMU + GNSS)
├─ ply/ply-result/
│ ├─ point_cloud/iteration_100/point_cloud.ply # The 3DGS itself
│ └─ cameras.json # Dummy (only the startup.jpg entry — unusable)
├─ Lcc2/lcc2-result/ # LCC2 export (3dgs/*.sog + mesh/*.ply + info/poses.json)
├─ mesh-files/<scan name>.obj # LiDAR mesh (coarse — tens of thousands of vertices, triangles ~20cm)
└─ project_data/
├─ poses.csv # Trajectory (ts,x,y,z,qx,qy,qz,qw)
└─ log/project.json # DeviceInfo.CameraList shows the camera configurationThe only thing we use here is .xbin — the heaviest file in the set. Its size scales with recording time; a scan of a few minutes lands around 1GB.
03 What xBin actually is: H.264 video, not JPEG
Running a binary analysis on .xbin reveals its real identity: an XBAG-format container (magic number "XBAG"), a "multiplexed sensor data" container similar in spirit to a ROS bag. Camera footage, LiDAR point clouds, IMU, and GNSS are all interleaved in a single file in time order.
You could demux the H.264 stream yourself and hand it to ffmpeg, but that requires correctly walking the XBAG record boundaries, which is a fair amount of work. The XGRIDS-native CLI tool covered in the next section lets you skip worrying about that step entirely.
04 The command to extract 4K source images
The tool used here is extract_images_h264.exe, bundled with LixelStudio. There's no need to launch LCC Studio or Lixel Studio — it's a single command line.
"C:\Program Files (x86)\LixelStudio\extract_images_h264.exe" ^
--hbc_path <path to .xbin> --out_dir <output directory> ^
--out_fps 5 --prj_version 1 --device_type 4 --use_blur_detect 1--prj_version 1 is not optionalOmit it and the tool exits silently with just "hbc not exsit" — no error message at all. Use 0 for .hbc format, 1 for .xbin format.--device_type specifies the capture device, but PortalCam isn't listed among the documented options. After actually testing it, here's what worked.
| device_type | Target device | Result |
|---|---|---|
| 1 | Lixel L2 | 0 images |
| 3 | Lixel L2 Pro | 0 images |
| 4 | Lixel K1 (this is the value PortalCam needs) | Extraction succeeds |
| 5 / 6 | (other devices) | 0 images |
Get just these two flags right, and images/camera_0/ and images/camera_1/ appear under your --out_dir, filled with 4000×3000 (12-megapixel) fisheye JPEGs named by timestamp. Note that --out_fps effectively has no effect — every frame from the source data is output regardless.
fisheye2perspective.exe. The image at the top of this article, and the figures below, are all post-conversion.05 The constraint: only 2 of the 4 cameras come out
PortalCam's camera configuration can be checked in project_data/log/project.json under DeviceInfo.CameraList, and it's a 4-lens setup: left_main / left_seco / right_main / right_seco. Definitions for all four channels exist inside the .xbin header's binary structure as well.
In practice, though, extract_images_h264.exe only decodes left_main and right_main — two streams. We haven't yet found a way to output the seco side.
Fortunately, camera_0 and camera_1 form a synchronized stereo pair with 0ms timestamp difference, so parallax information itself is preserved.
06 Testing it: photogrammetry from the extracted images fails across the board
From here on, the conclusion comes with caveats. We wondered whether, if 4K source images could be pulled out, photogrammetry could also build a mesh from them — and tested it on a conference-room scan (82 capture points × 2 lenses = 163 images). At this point, this route is a dead end.
fisheye2perspective.exe, it stalls at the Aligning Images step with 0% CPU usage. In practice: 593 seconds of CPU time consumed, then 38 minutes with zero progress, memory usage draining from 1GB down to 0.29GB, and the main window becoming unresponsive — we force-quit it. Output: zero results.0xC0000142. The cause is Windows Smart App Control blocking an unsigned DLL (cholmod-*.dll). Since disabling Smart App Control is an irreversible operation that can only be undone by reinstalling Windows, we didn't go down that path for this test.
The underlying cause is a matter of image count and spacing. 82 capture points × 2 lenses is too sparse for feature matching to succeed. PortalCam is designed to collect 3DGS data continuously while walking, which is fundamentally at odds with the shooting style photogrammetry assumes: staying at one point and capturing with a high overlap ratio. On top of that, the conference room we tested had a lot of blank walls, meaning few distinguishable feature points to begin with. The fisheye-to-perspective conversion itself worked without issue (163 images processed in 8.2 seconds) — the bottleneck is entirely on the reconstruction side.
07 Where this is useful, and a summary
To sum up this article: PortalCam's raw data (.xbin) is an XBAG-format H.264 video, and passing it through extract_images_h264.exe with --prj_version 1 and --device_type 4 extracts 4K source images — that's the whole path. That said, only 2 of the 4 lenses can be output, and photogrammetry reconstruction from the extracted images alone hasn't panned out so far.
The most practical use we've found is as AI reference material. The extracted sequential frames are real photographic capture of the actual site, which makes them a strong reference for correcting background artifacts with Nano Banana Pro or Gemini, and a strong input for Higgsfield's (SeeDance) @location feature. For a fuller walkthrough of that AI production workflow, see How to generate an "aerial cut" from 3DGS.
If you have questions about handling raw data or 3DGS production, feel free to reach out.
Questions about PortalCam raw data or custom scans
If your project needs adjustments at the raw-data level — outputting source images for AI reference, or designing a scan around a specific site's shooting conditions — feel free to get in touch.
Contact us →Production credit
Founder of Locahun 3D (LOCAHUN 3D). Researches and tests capture workflows that combine 3DGS scanning with game engines and AI.
Follow @Kou45388803 →