我需要在图上检测x轴和y轴.对于PHP现有库无法检测到线作为这个过程需要Hough变换方法(请纠正我,如果我错了)有什么方法来检测用/轴系不Hough变换使用PHP.
图中的一个例子:

我想平均一些被零均值高斯加性噪声破坏的.jpg图像.在搜索之后,我想出了添加图像矩阵并将总和除以矩阵的数量.但是,得到的图像是全黑的.通常,当图像数量增加时,结果图像变得更好.但是当我使用更多图像时,它会变暗.
我使用800x600黑白.jpg图像.这是我使用的脚本:
image1 = imread ('PIC1.jpg');
image2 = imread ('PIC2.jpg');
image3 = imread ('PIC3.jpg');
image4 = imread ('PIC4.jpg');
sum = image1 + image2 + image3 + image4;
av = sum / 4;
imshow(av);
Run Code Online (Sandbox Code Playgroud) 我想通过解析TXT字段数据来扩展下面的代码.我只是添加了TXT字段的检查并开始解析数据.然而,rdata字段以小端格式出现.我打算使用正则表达式来删除带有Base64编码字符串的垃圾,我认为有更好的方法可以做到这一点.
#!/usr/bin/env python
import dpkt, socket, sys
if len(sys.argv) < 2 or len(sys.argv) > 2:
print "Usage:\n", sys.argv[0], "filename.pcap"
sys.exit()
f = open(sys.argv[1])
pcap = dpkt.pcap.Reader(f)
for ts, buf in pcap:
# make sure we are dealing with IP traffic
# ref: http://www.iana.org/assignments/ethernet-numbers
try: eth = dpkt.ethernet.Ethernet(buf)
except: continue
if eth.type != 2048: continue
# make sure we are dealing with UDP
# ref: http://www.iana.org/assignments/protocol-numbers/
try: ip = eth.data
except: continue
if ip.p != 17: continue
# filter on …Run Code Online (Sandbox Code Playgroud)