当前位置:网站首页>Is the numpy index the same as the image index?
Is the numpy index the same as the image index?
2022-06-30 01:00:00 【FakeOccupational】
numpy Is the index of the same as the index of the picture ?(numpy The index of and the index of picture coordinates are just the opposite )
- Two dimensional coordinate system in picture :

a = np.array([
[1,2,3],
[3,4,5],
[4,5,6]])
# Start cutting from an index
print(a[1:])
[[3 4 5]
[4 5 6]]

a[2:4,3:4]

therefore numpy The index of and the index of picture coordinates are just the opposite
x_min, y_min, x_max, y_max = int(2), int(3), int(4), int(15)
pic = np.random.random([664 , 624])
pic1 = pic[y_min:y_max,x_min:x_max]


边栏推荐
- After the element uses align items center and overflow auto, some contents are not fully displayed
- Go out and protect yourself
- Transaction summary on June 25, 2022
- Interviewer: how to solve the problem of massive requests for data that does not exist in redis, which affects the database?
- Outsourcing for 3 years is a waste
- 赛芯电子冲刺科创板上市:拟募资6.23亿元,共有64项专利申请信息
- Cloud, IPv6 and all-optical network
- Programmers with a monthly salary of less than 30K must recite the interview stereotype. I will eat it first!
- Yunna | fixed assets information system management, information-based fixed assets management
- 干外包3年,真废了...
猜你喜欢
![[concurrent programming] if you use channel to solve concurrency problems?](/img/6c/76bcc9b63117bda57937a49cfd8696.jpg)
[concurrent programming] if you use channel to solve concurrency problems?

In 2022, the latest and most detailed idea associated database method and visual operation of database in idea (including graphic process)

我,33岁,字节跳动测试开发,揭开北京“测试岗”的真实收入

The SQL statement concat cannot find the result

如何查看一个文件夹下所有文件的大小?
![[MySQL basic] general syntax 2](/img/fe/6837fe96cb99b54e5cbce8f20787a5.png)
[MySQL basic] general syntax 2

Online sql to CSV tool

【Games101】Transformation

Initial i/o and its basic operations

ResizeKit2.NET大小和分辨率独立
随机推荐
2022-06-29: x = {a, B, C, D}, y = {e, F, G, H}, the length of the two small arrays X and Y is 4. If yes: a + e = B + F = C + G = D + H
Bytek suffered a disastrous defeat in the interview: he was hanged on one side, but fortunately Huawei pushed him in, and he got an offer on three sides
MySQL installation steps (detailed)
面试官:大量请求 Redis 不存在的数据,从而影响数据库,该如何解决?
Nested call and chained access of functions in handwritten C language
Time flies that year
Crmeb SMS for program configuration of knowledge payment system
2022年最新最详细IDEA关联数据库方式、在IDEA中进行数据库的可视化操作(包含图解过程)
【three.js】WEB3D初次体验
[deep learning compilation] operator compilation IR conversion
Netease cloud music beta music social app "mus" matches friends of the same frequency through music
What are the top ten securities companies? In addition, is it safe to open a mobile account?
How to customize templates and quickly generate complete code in idea?
[MRCTF2020]Ezpop-1|php序列化
【深度学习编译】算子编译 IR 转换
PHP wechat merchant transfer to change initiating merchant transfer API
[qnx hypervisor 2.2 user manual]6.2.2 communication between guest and host
如何在IDEA中创建Module、以及怎样在IDEA中删除Module?
Command line Basics
Online text digit recognition list summation tool