当前位置:网站首页>[optical flow] - data format analysis, flowwarp visualization
[optical flow] - data format analysis, flowwarp visualization
2022-07-27 05:18:00 【Nongfu mountain spring 2】
Optical flow
1. data format
Optical flow data is not easy to label , At least we haven't seen the method of optical flow annotation . General , Optical flow represents , The movement of the same pixel , Forward optical flow is t -> t+1 Of , So when visualizing optical flow , The outline of the object and t The time is consistent . Backward optical flow is generally defined as :t - > t-1.
Open source optical flow data has many formats , However, generally, examples of data analysis are provided , Just read and parse by example . The data of optical flow is :HxWx2,H,W Respectively represent the height and width of the image ,2 It means that x,y Number of moving pixels in the direction . meanwhile , The movement here is based on the current point .
Here to sintel Visualize a picture in the dataset .
The first picture is 0.5 x img1 + 0.5 x img2.
The second picture is optical flow visualization .
2. flow warp
How to check the correctness of data when you get an open source optical flow data set ? How to combine optical flow and pictures for intuitive visualization ?
flow warp It is to sample pictures according to optical flow . Here we use cv2.remap To implement .
code:
step :
- according to h, w Generate benchmark matrix , Be careful grid It's a HxWx2 Matrix , The last dimension 2, Express [x, y] Displacement in direction . The following is right grid Printing of partial values .

- grid + flow, obtain warp Required optical flow .
- Last use opencv Of remap sampling , obtain warp The image after .
- here warp The image is img1, still img2 Well ? Should use the img2 Come on warp, because new_flow Is in img2 Position of pixels in . So the whole thing warp It's from img2 According to the forward optical flow warp To img1 The process of .
visualization :
The first picture is img1
The second picture is img2 warp Got img1
Why? warp Got img1 There are ghosting ?
because :new_flow = grid + flow,grid Is the base point matrix ,flow by [0, 0] when ,remap when , Will collect the original points .flow Not for 0 when , Will be based on new_flow sampling .
边栏推荐
- 2022年郑州轻工业新生赛题目-打死我也不说
- The project connects with Alipay payment, and the intranet penetration realizes the monitoring of asynchronous callback notification of successful payment of Alipay
- Sunset red warm tone tinting filter LUTS preset sunset LUTS 1
- Select user stories | the false positive rate of hole state in jushuitan is almost 0. How to do this?
- Introduction to MySQL optimization
- How does the TCP server handle multiple client connections on one port (one-to-one or one to many)
- Standard dialog qmessagebox
- What about PS too laggy? A few steps to help you solve the problem
- JVM上篇:内存与垃圾回收篇十四--垃圾回收器
- 探寻通用奥特能平台安全、智能、性能的奥秘!
猜你喜欢

Constraints of MySQL table

How to create an applet project

idea远程调试debug

Li Kou achieved the second largest result

JVM上篇:内存与垃圾回收篇五--运行时数据区-虚拟机栈

Introduction to Web Framework

The difference between strlen and sizeof

34. Analyze flexible.js

Installation and template setting of integrated development environment pychar

pyside2____ 1. Installation and case listing
随机推荐
Introduction to Kali system ARP (network disconnection sniffing password packet capturing)
事件的接受与忽略
Solution to Dlib installation failure
Use of file i/o in C
pyside2____1.安装和案列
Create datasource using Druid connection pool
B1022 D进制的A+B
Three paradigms, constraints, some keyword differences,
树莓派rtmp推流本地摄像头图像
Could not autowire.No beans of ‘userMapper‘ type found.
SSM framework integration
Use ngrok for intranet penetration
I've heard the most self disciplined sentence: those I can't say are silent
JVM Part 1: memory and garbage collection -- runtime data area 4 - program counter
JVM Part 1: memory and garbage collection part 7 -- runtime data area heap
"Photoshop2021 introductory tutorial" flatten "perspective images
Advantages of smart exhibition hall design and applicable industry analysis
JVM上篇:内存与垃圾回收篇十一--执行引擎
事件过滤器
Transaction database and its four characteristics, principle, isolation level, dirty read, unreal read, non repeatable read?