当前位置:网站首页>Image processing: floating point number to fixed point number
Image processing: floating point number to fixed point number
2022-07-24 10:22:00 【Liu Yaner】
If you don't want to lose data accuracy , Be sure to use floating point numbers , have access to vivado Provided to calculate floating-point numbers IP nucleus
Reference material
The following method is to convert floating-point numbers to fixed points , It is used in extracting image brightness information
Floating point number calculation formula
Y = 0.299*R + 0.587*G + 0.114*B;
Cb = -0.169*R - 0.331*G + 0.5 *B ;
Cr = 0.5 *R - 0.419*G - 0.081*B;
Fixed point number calculation formula : First expand the decimal to an integer , Then divide by shifting
Y = (77 *R + 150*G + 29 *B)>>8
Cb = (-43*R - 85 *G + 128*B + 32768)>>8
Cr = (128*R - 107*G - 21 *B + 32768)>>8
边栏推荐
- Kotlin Advanced Grammar
- Uniapp calendar component
- Balance between management / business and technology
- Arduino- how to light the LED?
- 常量指针、指针常量
- When the hot tea is out of stock, what does the new tea drink rely on to continue its life?
- The best time to buy and sell stocks includes handling charges (leetcode-714)
- [STM32 learning] (13) STM32 realizes ultrasonic ranging (hc-sr04)
- fatal: unable to commit credential store: Device or resource busy
- How does ribbon get the default zoneawareloadbalancer?
猜你喜欢

OSPF含特殊区域实验,MGRE构建和重发布

WEB安全基础 - - -文件上传(文件上传绕过)

Websocket 协议解读-RFC6455

Golang migrate is easy to use

Raspberry Pie: /bin/sh: 1: bison: not found

String__

Mysql database JDBC programming

Deployment and analysis of coredns

Ribbon's loadbalancerclient, zoneawareloadbalancer and zoneavoidancerule are three musketeers by default

Zoj1137+ operation 1 -- May 28, 2022
随机推荐
MySQL performance optimization (IV): how to use indexes efficiently and correctly
Raspberry Pie: serial port login does not display print information
Selnium checks three conditions when it cannot locate an element
Common Unicode encoding range
[STM32 learning] (10) stm32f1 general timer realizes pulse counter
Redis configuration serialization
Deployment and analysis of coredns
Erlang learning 01
Is CITIC Securities a safe and reliable securities firm? How to open an account?
error: field ‘XXX’ declared as a function
OSPF含特殊区域实验,MGRE构建和重发布
Golang migrate is easy to use
Can the "self-help master" who has survived the economic crisis twice continue to laugh this time?
Query about operating system security patch information
CMS vulnerability recurrence - foreground arbitrary user password modification vulnerability
[robot learning] mechanism kinematics analysis and MATLAB simulation (3D model +word report +matlab program)
Web page opening speed is very slow, how to solve it?
Zoj1137+ operation 1 -- May 28, 2022
When the hot tea is out of stock, what does the new tea drink rely on to continue its life?
How to solve the problem of robot positioning and navigation in large indoor scenes with low-cost solutions?