当前位置:网站首页>Understand corners_ Align, two perspectives for viewing pixels
Understand corners_ Align, two perspectives for viewing pixels
2022-07-24 18:33:00 【blanklog】
Pixel aligning corners The concept is generally in the image Resize In the process of interpolation, we will encounter . In fact, this corresponds to two different perspectives on pixels , Affect the final coordinate mapping process .
1. How to treat pixels
Let's say I have a 5x5 Image 
Centers-aligned: Regard pixels as a square with area , The center point of the square represents this pixel . In this way, the width of the image is equal to the number of pixels
.Corners-aligned: Think of the pixel as an ideal point , The position of this point represents this pixel . In this way, the width of the image is equal to the number of pixels minus one


Different perspectives on pixels
2. Resize
When doing Resize when , The scaling relationship between the two is different
Centers-aligned:

Corners-aligned:


3X3 resize To 5X5
3. interpolation
Centers-aligned: Falling / During L sampling , The mapped coordinates will exceed the image boundary , The interpolation rules of these points will be different . As shown in the above figure, during the sampling process , The first pixel of the target image ( Green dot ) Exceed the first pixel of the original image ( Red dot ) Beyond the borders .

Corners-aligned: Because the pixel positions of the four corners are corresponding , There will be no situation beyond the boundary .
summary :
centers-gligned | corners-aligned | |
|---|---|---|
Pixels | Square with area | Ideal point |
The width of the image | Equal number of pixels | Equal to the number of pixels minus one |
Specify the scale | The number of pixels remains proportional | The number of pixels does not maintain proportion |
Boundary interpolation problem | The boundary may be beyond the image range , Interpolation may have problems | The four points are perfectly aligned , There is no interpolation problem |
边栏推荐
- 【校验】只能输入数字(正负数)
- Sword finger offer 21. adjust the array order so that odd numbers precede even numbers
- Tree chain partition board
- ["code" power is fully open, and "chapter" shows strength] list of contributors to the task challenge in the first quarter of 2022
- Mid year inventory | in 2022, PAAS will be upgraded again
- Vsftpd2.3.4 port penetration 6200 IRC_ 3281_ backdoor
- Namespace:集群环境共享与隔离
- Cookies and session "suggestions collection"
- Go小白实现一个简易的go mock server
- JMeter -- prometheus+grafana server performance visualization
猜你喜欢

Mysqlworkbench performance analysis tool -- Performance dashboard

Get familiar with pytoch and pytoch environment configuration

网络安全80端口—-PHP CGI参数注入执行漏洞

Wechat applet

Mysql——》BufferPool相关信息

全国职业院校技能大赛网络安全竞赛之数据分析数字取证-A

怎么解决idea中yaml无法识别或者飘红?

【“码”力全开,“章”显实力】2022年第1季Task挑战赛贡献者榜单

The drop-down list component uses iscrol JS to achieve the rolling effect of the pit encountered

Getting started with MySQL database
随机推荐
middleware
Pytoch's Journey 2: gradient descent
线段树合并板子
下拉列表组件使用 iScroll.js 实现滚动效果遇到的坑
13 essential methods of color!
Vsftpd2.3.4 port penetration 6200 IRC_ 3281_ backdoor
Read zepto source code touch module
[verification] only numbers (positive and negative numbers) can be entered
Ionic4 learning notes 8 -- UI component 2 list (no practice, direct excerpt)
线程的生命周周期和基本方法
core dump
Template syntax [easy to understand]
Tree chain partition board
pycharm配置opencv库
永恒之蓝MS17-010exp复现
理解动态计算图,requires_grad、zero_grad
jmeter -- prometheus+grafana服务器性能可视化
Wechat applet
【微信小程序开发】自定义tabBar案例(定制消息99+小红心)
Ionic4 learning notes 9 -- an east project 01
.

