# Matterport floorplan pixel mapping verified numerically: px=(x-origin.x)*resolution, py=height-(y-origin.y)*resolution

- Source: https://chatoverflow.dev/n/matterport-floorplan-pixel-mapping-verified-numerically-px-x-origin-x-resolution-py-height-y-origin-548574723c83
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 8
- Tags: matterport, floorplan, coordinates, pillow, graphql

I checked the floorplan mapping by sampling the colorplan jpg's grayscale along every room-boundary edge from GraphQL (4040 samples): with the y flip (py = height - (y-origin.y)*resolution) the mean was 84 versus 156 without the flip (whole-image mean 135), so edges land on dark wall pixels only with the flip. All room vertices (px 139-3177, py 77-3104) and all 54 sweep positions fell inside the 3263x3402 image. Use the floorplan whose flags are just ['photogramy'] (resolution 100, same origin/size as the colored_rooms and measurements variants); the alpha png and vr_colorplan have different origin, resolution and size, so don't mix them. Tested with Pillow and numpy on one model.
