div class="arc-summary mt-1"> 本文介绍了将LPBYTE变量视为图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! /div> h3 class="mb-1">问题描述/h3> p class="cn">在我的田径训练中,我遇到了LPBYTE变量,它以帧形式传送给我br /> br/>我想找到一种在我的电脑上查看这些帧的方法br /> br/>因为我没有太多的经验,我有点卡在那里:( br /> br/> br /> br/> LPBYTE作为无法识别的符号到达我,如:br /> br/> br /> br/>,价优惠¥ ¥¥¥¥¥¥|||§§§§§§§§§§§§§§§|||||||§§§§¨¨¨©©©ھھھھھھھھھھھ©©¨¨©©¨© ©©©©©©©©©©©©ھھھ«««««««««««ھھ««ھ««««¬¬¬¬¬¬¬¬¬¬¬ھھ©©©©§§ §|¥¥||©ھ««¬¬¬¬¬¬¬¬¬¬©>fccccXuv\¬«ھ«ھھھ««¬¬¬¬®®®®®®®®®®® ®®®®®®®®¯°°°°¯®®®®®®®®®®®®®®®®¯°¯¯®®¬®®¬¬¬¬¬¬¬¬¬¬« «««« ھ«««««««¬¬©¨|,??ں> br/> br /> br/> br /> br/>并保存为(。 JPEG或.bmp)它不会打开,br /> br/>所以,我认为它可能是原始像素数据,但仍然找不到查看它的方法br /> br/> br /> br/>任何人都可以帮我在我的电脑上查看这些帧吗?em class="showen">/em>/p>p class="en">In my feild training i've come across LPBYTE variable that is streamed to me as framesbr />I want to find a way to view these frames on my pcbr />since i don't have a lot of experiance, i'm kinda stuck there :(br />br />the LPBYTE arrives to me as unrecognized symbols, like:br />br />،¤¤¤££££££££££¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¥¥¥¥¥¥¥¥¥¥¥¥¥¥¦¦¦§§§§§§§§§§§§§§§¦¦¦¦¦¦¦§§§§¨¨¨©©©ھھھھھھھھھھھ©©¨¨©©¨©©©©©©©©©©©©©ھھھ«««««««««««ھھ««ھ««««¬¬­¬¬¬¬¬¬¬­¬¬ھھ©©©©§§§¦¥¥¦¦¨©ھ««¬¬¬¬¬¬¬¬¬­­­­­­­­­­­­­­­­­­­­­­­­­­­¬©›„fccccXuv\"¬«ھ«ھھھ««¬¬¬­­­­­­­­­­¬®®­®®®®®®®®®®®­­®®­®®®®¯°°°°¯®­­®®­®®®®®®®®®®®­­­­®®¯°¯¯®®­­­­­¬®®­­­¬¬¬¬¬¬­­­­¬­­­­­­¬¬¬«««««ھھ««ھ««««¬¬ھ©¨‹¦‚ں br />br />br />and when saving it as (.JPEG or .bmp) it wont open,br />so, I was thinking that it may be raw pixel data, but still can't find a way to view it br />br />can any one help me to view these frames on my pc ?/p>h3 class="best_ans mt-1">推荐答案/h3>p class="cn"> /p>blockquote class="cn">有没有_important_详细信息?br /> br/>即br /> br/>■每帧中有多少字节?br /> br/>■图像的预期位深度是多少?br /> br/>■什么是分辨率?br /> br/> br /> br/>无论如何,尝试使用图像的一小部分 - 可能是5或10像素。br /> br/> 1)保存收到的数据到二进制文件br /> br/> 2)用十六进制编辑器打开文件并写下15-> 20或30-> 40的字节(即5个像素的3或4个字节,或者3个或4个字节,10个像素)br /> br/> 3)打开您喜欢的图像编辑程序并开始输入数据。 br /> br/> br /> br/>即如果前6个字节是FF 000 00 FF 00 00,那么您可以尝试假设图像是24位。然后你可以说2像素的颜色值是(255,0,0)和(255,0,0) - 如果你不熟悉十六进制数字,可以在程序员模式下使用windows计算器。br /> br/> br /> br/>在几个像素(可能是5或10)之后,您可以将数据识别为图像。br /> br/>另请注意,我假设数据是存储为RR GG BB RR GG BB等。您可能还希望尝试BB GG RR BB GG RR。br /> br/> br /> br/>最后,根据您的设备,它甚至可能不会是rgb数据 - 即使它是原始的,未压缩的视频帧。如果数据以YUV格式出现,那将不会让我感到惊讶 - 这种格式源于模拟电视信号。需要转换为rgb或hsl颜色模型的数据。虽然,YUV会使我的下一个建议不那么有用。br /> br/> br /> br/>一个好的方法也可能是将数据打印为ascii字符,确保每行的字符数是与每行预期像素数相同。虽然它不会真正揭示​​图片,但它可以是视觉识别图案的快速方式。如果数据只有8位也会有所帮助。你不会有调色板,但你可以看到图像。br /> br/> br /> br/>正如你所看到的,有很多潜在的陷阱和事情可能会阻碍你的努力。 br /> br/>祝你好运!em class="showen">/em>/blockquote>blockquote class="en">Got any of the _important_ details?br />I.ebr />■ How many bytes are in each frame?br />■ What is the expected bit-depth of the images?br />■ What's the resolution?br />br />Anyway, Try working with a small section of the image - perhaps 5 or 10 pixels.br />1) Save the received data to a binary filebr />2) Open the file with a hex editor and write down 15->20 or 30->40 of the bytes (I.e 3 or 4 bytes for 5 pixels, or 3 or 4 bytes for 10 pixels)br />3) Open your favourite image editing program and start entering the data. br />br />I.e if the first 6 bytes are FF 000 00 FF 00 00, then you may try working with an assumption that the image is 24 bits. You could then say that the colour values for 2 pixels are (255,0,0) and (255,0,0) - use windows calculator in programmer mode if you're not familiar with hexidecimal numbers.br />br />After several pixels - perhaps 5 or 10, you may be able to recognize the data as an image.br />Also note, I've assumed that the data is stored as RR GG BB RR GG BB etc. You may also wish to try BB GG RR BB GG RR.br />br />Finally, depending on your device, it may not even be rgb data - even if it is raw, uncompressed video frames. It wouldn't surprise me if the data came out in the YUV format - one that draws roots from analog tv signals. Data that would need conversion to either of the rgb or hsl colour models. Though, YUV would make my next suggestion less useful.br />br />A good approach may also be to print the data as ascii characters, ensuring that the number of chars per line is the same as the number of expected pixels per row. Although it wont really reveal the picture, it can be a fast way of visually recognising a pattern. It would also be helpful if the data was only 8 bit. You wouldn't have the palette, but you could see the image.br />br />As you can see, there are lots of potential pitfalls and things that may thwart your efforts.br />Good luck!/blockquote>p class="cn"> br/> /p> p>这篇关于将LPBYTE变量视为图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!/p>
10-30 08:37