PortalCamXGRIDS3DGSWorkflow 2026-07-26·~6 min read

Extracting 4K Source Images
from PortalCam's Raw Data (.xbin)

This is Kou Nakamura from Locahun 3D. When you scan with PortalCam, LCC Studio and Lixel Studio export 3DGS and point clouds for you — but behind that, the original 4K images taken by the camera itself are still sitting inside the raw data, untouched. This article covers how to extract 4K source images from the raw data (.xbin) using CLI tools alone, and lays out honestly what we learned trying photogrammetry reconstruction from those extracted images.

An example 4K source image extracted from PortalCam's raw data and converted from fisheye to perspective projection (a road and high-rise buildings)
An extracted 4K source image, converted to perspective projection. Inside the raw data it's recorded as a fisheye H.264 video, so it's converted here — as-is, it isn't easy to work with in ordinary image-processing software.
Scan with PortalCam→ .xbin (raw data)→ Extract with extract_images_h264.exe→ 4K fisheye JPEG→ Convert to perspective projection

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/                # The 3DGS itself
├─ Lcc2/lcc2-result/              # LCC2 export (3DGS + mesh)
├─ mesh-files/<scan name>.obj    # LiDAR mesh (coarse)
└─ project_data/                  # Trajectory, camera configuration, and logs

The 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

Analyzing .xbin reveals its real identity: an XBAG-format container — essentially one box holding all the sensor data at once. Camera footage, LiDAR point clouds, IMU, and GNSS are all interleaved in a single file in time order.

You can't just pull the images out of the fileScanning the entire file turns up zero embedded still images. The camera footage is recorded as H.264 video, so no image can be extracted without decoding it first.

You could pull the video portion out yourself and hand it to ffmpeg, but that requires correctly walking the file's internal structure, 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_typeTarget deviceResult
1Lixel L20 images
3Lixel L2 Pro0 images
4Lixel K1
(this is the value PortalCam needs)
Extraction succeeds
5 / 6(other devices)0 images

Get just these two flags right, and a folder per camera appears under your output directory, filled with 4K-class fisheye JPEGs named by timestamp. Note that the output frame-rate setting effectively has no effect — every frame from the source data is output regardless.

If the fisheye distortion is a problemThe extracted images are the raw circular fisheye capture. To use them in ordinary image-processing or photogrammetry software, convert them to perspective projection with the bundled 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 carries four lenses — a main and a secondary on each side. Definitions for all four exist inside the .xbin file as well.

In practice, though, extract_images_h264.exe only decodes the two main lenses. We haven't yet found a way to output the secondary side.

Fortunately, the two streams you do get form a stereo pair recorded at the same instant, so parallax information itself is preserved.

A 4K source image extracted from the camera_0 side (after perspective conversion)
One frame from the left main camera.
A 4K source image extracted from the camera_1 side (after perspective conversion)
One frame from the right main camera.The other eye's view, recorded at the same instant.

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. At this point, this route is a dead end.

RealityScan hangs completelyLoaded as-is (fisheye), it crashes right at launch. Even after converting to perspective projection, it stalls at the image-alignment step and never moves on. However long we waited, progress stayed at zero, the main window became unresponsive, and we force-quit it. Output: zero results.
COLMAP won't even launchIt crashes immediately. The cause is a Windows security feature blocking one of its unsigned bundled files. Since turning that feature off is an irreversible change that can only be undone by reinstalling Windows, we didn't go down that path for this test.

The underlying cause is how the images were shot. A scattering of frames captured while walking 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 lot of overlap between frames. 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 — the bottleneck is entirely on the reconstruction side.

If we try againReproducing this on the same site would need a re-shoot with far more overlap between frames. Extracting the secondary pair as well would add information, but for now only the main pair is available. For the time being, the most realistic use for the extracted images is as AI reference material, covered in the next section.

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 location reference for video-generation AI. 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.

Contact

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 →
Credits / Production

Production credit

Kou Nakamura
Kou Nakamura
Founder, Locahun 3D / Testing & writing

Founder of Locahun 3D (LOCAHUN 3D). Researches and tests capture workflows that combine 3DGS scanning with game engines and AI.

Follow @Kou45388803 →

This article is a production note from Locahun 3D / LOCAHUN 3D. Feel free to reach out about 3DGS capture, location scouting, VFX backgrounds, or AI production.

Contact us →

WORKFLOW: PORTALCAM SCAN → .XBIN (XBAG/H.264) → EXTRACT_IMAGES_H264 → 4K FISHEYE JPEG → PERSPECTIVE CONVERT

Extracting 4K Source Images from PortalCam's Raw Data (.xbin)|Locahun 3D Tech Blog