当前位置:网站首页>LabVIEW pictures look bright or dark after being cast from 16 bits to 8 bits
LabVIEW pictures look bright or dark after being cast from 16 bits to 8 bits
2022-06-10 23:47:00 【LabVIEW development】
LabVIEW The picture is from 16 Bit cast to 8 Look bright or dark after bit
I captured a picture with my camera 16 Bit image , And use IMAQ Cast Image VI Convert it to 8 Bit image . The image looks brighter or darker . The bit depth of the camera is 10 position . Why is that ?
answer :
If you use 10 Bit camera captures the original image , Then we are going to change it from 16 Bit representation is converted to 8 Bit indicates after , There are several reasons why the image looks different .IMAQ Cast Image VI There is one named # Shifts The input of . Although it is I32 Long integer , But its scope is forced in 0 To 8 Between integers of . When LabVIEW take 16 Bit images are converted to 8 Bit image , It shifts the data by the number of bits specified in the input , Then use only low 8 Bit represents a new image .

edit
Add picture comments , No more than 140 word ( Optional )
If the bit depth is 10 Bit camera captures images , There will be an exception . The bit depth of the buffer that holds the image will also be explicit 10 position . When using the conversion function to convert to a 8 Bit image , If # Shifts The input is 0, Then the function will still move the image 2 position . This will make the new 8 Bits indicate that the image looks the same as the original image . If # Shifts Other non 0 Value , Function will shift the specified number of bits to the left . therefore , If the value is 1 Words , The new image will look brighter , The value is 0 or 2 Will make the image look the same as the original image , And when the value is greater than 2 The image will appear darker than the original image .
This is when deciding what target cache to use for the result of the transform function , There's a certain relationship . For example , If you use one 10 The image captured by the bit camera is converted to 8 Bit image , And then back to 16 Bit image , So depending on whether you are reusing the same image buffer , Or create a new buffer , The result will be different . If you reuse buffers , You will keep the original image 10 Bit depth . But before you will 8 Bit images are converted to 16 Bit image , The conversion function does not move the number of bits back . therefore , The values of all pixels are constant , But now their bit depth is 10 instead of 8. When you convert to 8 Bit image , First, shift , But when you switch back , They will not be displaced back . On the other hand , If you use the new buffer as the target of the conversion function , Then the new image will have the same pixel value , And its bit depth will still be 8( Even though it is 16 Bit image ). therefore , It looks the same as the original image .
Here's a VI Examples to demonstrate the phenomena described above . The following tests can be carried out : Change the number of bits shifted , Or decide whether to reuse the buffer ( Be careful : To see more clearly the difference between reusing buffers and using new buffers , take # Shift Set to 0 or 2). This example should be matched with one set in MAX To read 10 Bit monochrome image camera use .
More details , Participate in the introduction of the following annex .
LabVIEW、LabVIEW Development 、LabVIEW Programming 、LabVIEW Program
Examples and information mentioned above , Both in word In the attachment in , Click to download . Learn more , Can you contact us .
边栏推荐
- 掌握高性能计算前,我们先了解一下它的历史
- Is it safe to open an account online in Shanghai?
- 自制APP连接OneNET---实现数据监控和下发控制(MQTT)
- MySQL learning child query
- LabVIEW改变Point ROI Overlay的形状或颜色
- 一 组工人合作完成某一部件的装配工序所需的时间(单位:分钟)分别如下:
- 嵌入式软件开发中的2种调试技术
- 干货丨MapReduce的工作流程是怎样的?
- Sealem Finance - a new decentralized financial platform based on Web3
- VS 番茄助手添加头注释 以及使用方式
猜你喜欢

MySQL table mechanism

干货丨MapReduce的工作流程是怎样的?

可扩展到Max–MCU和MPU开发,使用相同的许可证

LabVIEW在波形图或波形图表上显示时间和日期

mysql 表机制

LabVIEW锁相环(PLL)
![[paper sharing] pata: fuzzing with path aware Taint Analysis](/img/f6/627344c5da588afcf70302ef29d134.png)
[paper sharing] pata: fuzzing with path aware Taint Analysis
![[flutter problem series Chapter 6] how to achieve the scrolling effect of list messages in flutter](/img/d6/ae107f75c158e97913e6d75eac5b84.png)
[flutter problem series Chapter 6] how to achieve the scrolling effect of list messages in flutter

云图说|每个成功的业务系统都离不开APIG的保驾护航

宝塔计划任务Shell脚本定时删除某各目录下所有文件【记录】
随机推荐
字蛛(font-spider)教学——ttf/otf字体文件压缩
SQL查询优化原理实例分析
Commonplace - the timetable of the great philosopher Kant
Introduction to Wireshark capturing RTP load TS stream (UDP multicast)
Project training 10 - backup of specific databases
Is it safe for BOC securities to open an account? Is it formal?
Executor - Shutdown、ShutdownNow、awaitTermination 詳解與實戰
Usage of C tryparse
怎么生成自动参考文献(简单 有图)
Vs tomato assistant add header comments and usage
Why many new websites are not included by search engines
What Fiddler does for testing
R language to draw two-dimensional normal distribution density surface;
Is it safe to open an account for tongdaxin stock? How to open an account?
LeetCode 501 :二叉搜索樹中的眾數
掌握高性能计算前,我们先了解一下它的历史
上海证券开户是安全的吗?
Developers changing the world - Yao Guang teenagers playing Tetris
干货丨MapReduce的工作流程是怎样的?
The shell script of pagoda plan task regularly deletes all files under a directory [record]