当前位置:网站首页>Tempest HDMI leak receive 5
Tempest HDMI leak receive 5
2022-07-01 11:07:00 【Lao Shao's open source world】
The last article left a question , That is, how to solve the problem of vertical line inclination .
This problem should have been solved by communication , Find the trip synchronization signal , Then wrap at this signal .
But it's actually not easy to do , because hdmi It is not a wireless communication standard , There is no such information .
therefore , I plan to solve it by image processing . That is to find out the law of the original picture , Then make some modifications intuitively from the screen , To improve the effect .
I thought about affine transformation of graphs , Equivalent to rotating the image , But I don't think the effect will be very good .
Then I thought about , The current problem is simply that there is a offset The problem of . I just put this offset Just move the pixel of the position to the first point . Another problem is this offset It's changing for every line , Fortunately, the trend of change is fixed , For example, the next line is better than the previous line offset Increased by a fixed value . It's easy to do this .
Of course, when actually doing it, we will encounter various details , such as offset The rear pixel is moved to the left rear , This business offset Are the front pixels thrown away directly ? obviously , You can't do that , Otherwise, there will be something missing on the right side of each row . In fact, the right side of each line is the next line offset The pixels on the left are added .
And it doesn't matter if you can't write a cycle at once , It is suggested to refer to what I wrote in my notes , Imagine a special situation , Then write the actual pixel position and other figures of the special case , Then make a summary from the relationship between these pixels , Find out their rules , Then write the loop , It will be much more convenient .
In the actual process of writing code, we will encounter various problems :
such as range(0,10) It's from 0 To 9, If you want to include 10 It needs to be changed to range(0,10+1).
in addition offset If you keep subtracting a fixed value , It may be less than 0, Cause some values to exceed the boundary , At this time, you can imagine if one line offset Location is 0, The position of the next line can be regarded as -1( Less than 0), It can also be thought that it appears on the right side of the screen , This is the row width -1. That is to say, the line width can be taken as the period , stay offset Less than 0 Fill it up when . Empathy , If offset Adding a fixed value constantly may also exceed the row width , Then subtract one cycle from it ( Line width ) Just go . This is what I'm doing in code 56~59 What you can do . If you don't understand, you can delete this part , See if the program reports an error , Then put the corresponding x,y,offset Print out the variables of , See why these variables will report errors when taking this value, and you can understand why I want to write this .
from pylab import *
from rtlsdr import *
import cv2
sdr = RtlSdr()
# configure device
sdr.sample_rate = 1.951047e6
sdr.center_freq = 395.991e6
sdr.gain = 60
# init for opencv
x = 0
y = 0
img = np.zeros((600,600,1), np.uint8)
img_to_show = np.zeros((600,600,1), np.uint8)
coarse_length_of_line = 580
fine_tune_of_offset_variation = -2
height_to_draw = 500
while True:
samples = sdr.read_samples(1024*100) #type(sample) is numpy.complex128
for sample in samples:
mag = np.sqrt( sample.imag * sample.imag + sample.real * sample.real)
value = mag * 255 * 10 #type(value) numpy.float64
img[y, x] = value
img[y, x + 1] = value
img[y, x + 2] = value
img[y, x + 3] = value
img[y, x + 4] = value
img[y, x + 5] = value
img[y, x + 6] = value
img[y, x + 7] = value
img[y, x + 8] = value
img[y, x + 9] = value
x = x + 10
if (x >= coarse_length_of_line):
x = 0
y = y + 1
if (y >= height_to_draw):
y = 0
offset = 0
for j in range(0, height_to_draw):
for i in range(0, coarse_length_of_line - offset + 1): # contains 0 and coarse_length_of_line - offset
img_to_show[j, i] = img[j, i + offset]
for i in range(coarse_length_of_line - offset + 1, coarse_length_of_line + 1):
img_to_show[j, i] = img[j + 1, i + offset - coarse_length_of_line - 1]
offset = offset + fine_tune_of_offset_variation
if (offset < 0):
offset = offset + coarse_length_of_line
elif (offset > coarse_length_of_line):
offset = offset - coarse_length_of_line
'''
img_to_show[0, 0] = img[0, 50]
img_to_show[0, 1] = img[0, 51]
...
img_to_show[0, 530] = img[0, 580]
img_to_show[0, 531] = img[1, 0]
...
img_to_show[0, 580] = img[1, 49]
img_to_show[1, 0] = img[1, 45]
img_to_show[1, 1] = img[1, 46]
...
img_to_show[1, 535] = img[1, 580]
img_to_show[1, 536] = img[2, 0]
...
img_to_show[1, 580] = img[2, 44]
'''
cv2.imshow("HDMI", img)
cv2.imshow("HDMI2", img_to_show)
if(cv2.waitKey(10)==27):
break
sdr.close()My program still has a lot to optimize , For example, there is always a thin slash in the middle of the corrected picture , If you know why you can tell me .
The other is if you can find hdmi The actual impact of line synchronization and frame synchronization signals on the radio and used for deviation correction is better .
The actual effect of this code :
边栏推荐
- Half of 2022 has passed, isn't it sudden?
- TEMPEST HDMI泄漏接收 5
- 云上“视界” 创新无限 | 2022阿里云直播峰会正式上线
- Node version manager NVM installation and switching
- Valgrind usage of memory leak locating tool
- Export and import of incluxdb on WIN platform
- PHP有哪些优势和劣势
- LeetCode. One question of the day: offer II 091 Paint the house (DP problem)
- No statements may be issued when any streaming result sets are open and in use on a given connection
- Valgrind usage of memory leak locating tool
猜你喜欢

Uncover the secrets of new products! Yadi Guanneng 3 multi product matrix to meet the travel needs of global users

The list of winners of the digital collection of "century master" was announced

12 product management platforms that everyone is using

JS基础--数据类型

The idea runs with an error command line is too long Shorten command line for...

y48.第三章 Kubernetes从入门到精通 -- Pod的状态和探针(二一)

12 plateformes de gestion de produits utilisées par tout le monde

Sqlachemy common operations

价值1000毕业设计校园信息发布平台网站源码

In June 2022, it was the first programming language?!
随机推荐
Detailed explanation of linear regression in machine learning
谷歌新论文-Minerva:用语言模型解决定量推理问题
Google's new paper Minerva: solving quantitative reasoning problems with language models
LeetCode 438. Find all letter ectopic words in the string__ sliding window
关于Keil编译程序出现“File has been changed outside the editor,reload?”的解决方法
放弃深圳高薪工作回老家
"Target detection" + "visual understanding" to realize the understanding and translation of the input image (with source code)
The idea runs with an error command line is too long Shorten command line for...
Submission lottery - light application server essay solicitation activity (may) award announcement
Personal mall two open Xiaoyao B2C mall system source code - Commercial Version / group shopping discount seckill source code
Internal control of fund managers
What are the advantages and disadvantages of PHP
Whether lending a bank card to others constitutes a crime
Can servers bundled with flask be safely used in production- Is the server bundled with Flask safe to use in production?
LeetCode 438. 找到字符串中所有字母异位词__滑动窗口
Ask everyone in the group about the fact that the logminer scheme of flick Oracle CDC has been used to run stably in production
node版本管理器nvm安装及切换
bash: ln: command not found
Mall applet source code open source version - two open
Prism journal navigation button usability exploration record
https://www.bilibili.com/video/BV1U34y1H7YD