当前位置:网站首页>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 .
边栏推荐
- PwnTheBox,Web:hello
- Exécuteur - shutdown, shutdown Now, awaittermination details and actual Fighting
- Data and information resource sharing platform (IV)
- Is it safe for CICC Fortune Securities to open an account? Is it reliable?
- Ma8601 pin √ pin replaces Tang Ming fe1.1s without changing the circuit board | perfectly replaces fe1.1s scheme
- LeetCode 501 :二叉搜索樹中的眾數
- LabVIEW锁相环(PLL)
- [paper sharing] pata: fuzzing with path aware Taint Analysis
- Unity script cannot display Chinese comments of C # source code or the script created by vs does not have comments of C # source code
- 34. 在排序数组中查找元素的第一个和最后一个位置-二分查找、双指针
猜你喜欢

Project training 11 - regular backup of database

Leetcode 501: mode dans l'arbre de recherche binaire

Ma8601 pin √ pin replaces Tang Ming fe1.1s without changing the circuit board | perfectly replaces fe1.1s scheme
![[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

OSS stores and exports related content

Project training 13 - Interface supplement
![[论文分享] PATA: Fuzzing with Path Aware Taint Analysis](/img/f6/627344c5da588afcf70302ef29d134.png)
[论文分享] PATA: Fuzzing with Path Aware Taint Analysis

SystemVerilog(十)-用户自定义类型

30 | 怎么重设消费者组位移?

Project training 10 - backup of specific databases
随机推荐
黑马头条丨腾讯薪酬制度改革引争议;英特尔全国扩招女工程师;黑马100%就业真的吗......
An adaptive size / full screen display method for iframe frames
Im instant messaging source code with tutorial /uniapp instant messaging source code, with installation tutorial
Prefer "big and small weeks", only write 200 lines of code every day, and the monthly salary of 8k-17k people will rise again
上海网上开户是安全的吗?
Sealem Finance - a new decentralized financial platform based on Web3
Solutions to the error reported by executing Oracle SQL statement [ora-00904: "createtime": invalid identifier] and [ora-00913: too many values]
Unity 脚本无法显示C#源码的中文注释 或者VS创建的脚本没有C#源码的注释
Dell R730 raid5 安装Server 2016(解决磁盘大于2T)
Data and information resource sharing platform (6)
34. 在排序数组中查找元素的第一个和最后一个位置-二分查找、双指针
LabVIEW中创建毫秒时间标识
干货丨MapReduce的工作流程是怎样的?
[paper sharing] pata: fuzzing with path aware Taint Analysis
Leetcode 501: mode dans l'arbre de recherche binaire
LabVIEW图片在从16位强制转换为8位后看起来要亮或暗
Executor - Shutdown、ShutdownNow、awaitTermination 详解与实战
OSS stores and exports related content
[Video] kmeans mean clustering and hierarchical clustering: R language analysis life happiness index visualization | data sharing
Ma8601 pin √ pin replaces Tang Ming fe1.1s without changing the circuit board | perfectly replaces fe1.1s scheme