开发者

Quadtree decomposition on non square image

开发者 https://www.devze.com 2023-02-11 18:13 出处:网络
Does anyone know the best way to perform Quadtree decomposition on a non square image? I keep getting lines appearing across my image which 开发者_如何学运维is drawn using a Quadtree.The simplest thin

Does anyone know the best way to perform Quadtree decomposition on a non square image? I keep getting lines appearing across my image which 开发者_如何学运维is drawn using a Quadtree.


The simplest thing would probably be to imagine that your image is embedded in a square image (placed centrally, so that bisection of the larger image corresponds to bisection of the smaller one). When drawing it, of course you'd then need to avoid drawing bits that aren't actually within the image rectangle, but I'd have thought the special-case code needed for that would be simpler than the special-case code needed to handle non-square images.

Without more information about just what you're doing and just what's going wrong, I don't think there's much prospect of debugging your lines-appearing-across-the-image problem. (Is it possible that the underlying problem there is that your size isn't a power of 2, rather than that it's not square? In other words, that something isn't being done quite right when bisecting the image produces "halves" of different sizes?)

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号