SShortSingh.
Back to feed

UG32 raster processing in Python: assigning each output pixel a single owner

0
·4 views

A raster worker frequently needs more input data than the region it outputs, such as neighboring pixels for a filter or extra context for an image model. Adding overlap to every tile supplies that context, but writing all overlapping results to the destination can let the last finishing worker overwrite another's prediction, hiding inconsistent boundary ownership. The article presents an offline Python window planner, using only the standard library, that separates three rectangles per worker: a non-overlapping core it owns, a larger read area it consumes, and a crop that selects the core-sized result. It uses left/top-inclusive, right/bottom-exclusive coordinates so widths follow ordinary slicing, and it assumes no specific camera, processor, or format. The planner is designed to make stitching errors reproducible and testable without a large dataset, and it does not open imagery or run a model.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

Found a Cracked Copy of Your App? A Practical Incident Response Plan for Indie Developers

A developer who discovers a pirated version of their paid desktop app, Unity asset, or repository should treat it as an incident and respond in two tracks. The guide advises first preserving evidence such as URLs, file hashes, and screenshots before contacting any host, and avoiding running suspicious downloads on development machines. It distinguishes between cracked binaries, leaked keys, re-uploads, clones, and impersonation, since each raises different legal and technical concerns. It also stresses that client-side licensing can only raise the cost of piracy, not eliminate it, so the goal is to limit casual copying and keep legitimate customers' experience smooth. The article notes it is not legal advice and recommends consulting a qualified lawyer when business identity, revenue, or customer safety is at stake.

0
ProgrammingDEV Community ·

AER-1 Is an IETF Internet-Draft, Not an Official Standard, Yet Widely Implemented

AER-1 is an Internet-Draft (draft-zambo-aer1-26), dated October 2026, with an intended status of Informational. It is a working document that has not been adopted by an IETF working group and is therefore not an RFC or an official IETF standard. Its status as a de facto standard rests on a public conformance corpus of 143 test vectors and on independent implementations that pass it. A completed cross-framework interoperability run in November 2026 also reportedly matched expected results across two appraisers. The article's author discloses that they run operations for Zambo, the product that publishes AER-1.

0
ProgrammingDEV Community ·

PHP PDO and SQLite: Demonstrating and Fixing SQL Injection

A PHP lecture for intermediate developers explains how to connect to a database with PDO, run queries using prepared statements, and recognize and remediate SQL injection. The examples use SQLite, which ships with PHP, so no database server is required, and were run on PHP 8.5.6 with SQLite 3.53.4. A demonstration shows that concatenating user input into a query lets a crafted payload return every row in a users table that a login check was meant to protect. The same input passed through a prepared statement returns no rows, confirming the fix. The article also recommends explicitly setting the exception error mode, since silent mode hides the real cause of failures behind misleading later errors.

0
ProgrammingDEV Community ·

Five AI Staging Tools Compared on File Size and Pixel Density

A tester ran the same 36-megapixel room photo through five virtual staging tools and measured the actual dimensions and file sizes of each output. Raw file size proved misleading, so the author used bits per pixel, a scale-independent metric, to compare encoding quality. The analysis found that a small 131 KB file was not heavily compressed, while the 3.8 MB file from VirtualStaging.AI retained full resolution and was genuinely re-encoded at higher quality. Vendor labels such as "full size" and "1080P" turned out to reflect default choices rather than standard measurements. The author concluded that each tool's output suits a different purpose, such as print versus MLS listing feeds.