百度OCR初探-python

news2025/6/26 7:15:13

百度OCR使用🚀


        在项目中需要对一些资料首先进行OCR识别,然后对OCR之后得到的结果进行结构化分析,各家的都打算简单尝试一下,首先尝试一下百度的OCR,首先找到百度的OCR的官方,开始自己搜索然后尝试。

OCR(Optical Character Recognition,光学字符识别)技术是一种将图片中的文字内容转换成机器可读的文本的技术。这种技术可以识别和转换各种来源的文本数据,如扫描文档、照片中的文字和PDF文件中的打印文字。OCR技术广泛应用于数据录入、自动化文档处理、车牌识别以及智能文档搜索等领域。


文章目录

  • 百度OCR使用🚀
  • 1.服务开通
  • 2.免费试用领取
  • 3.API使用
    • 3.1 access_token 获取
    • 3.2 OCR 识别python代码部分
  • 4.结束
  • 附加—付费开通(如果没有免费试用的话)

1.服务开通


https://cloud.baidu.com/product/ocr/general
在这里插入图片描述
点击立即使用,下面会跳出安全协议,划到下面然后,点我已阅读并同意即可。
在这里插入图片描述

2.免费试用领取


第一部分的协议点击确认同意之后,进入到当前页面,然后点这个免费尝鲜的去领取。
在这里插入图片描述
然后选择待领取接口点上全部,然后先下面的零元领取
在这里插入图片描述
然后出现领取成功的字样。
在这里插入图片描述
然后点击前往应用列表,点击创建应用,然后把上卖弄的应用名称填了。

在这里插入图片描述
然后再把应用归属选了自己测试的话选个个人就行,然后再随便填一下应用描述,点击立即创建。
在这里插入图片描述
然后点击返回应用列表。
在这里插入图片描述
然后就能看见自己的API Key 和 Serect Key了,把这两个key给保存下来,代码中会用到
在这里插入图片描述

3.API使用


3.1 access_token 获取

        在获得了API-Key和Serect-Key之后,接下来要使用这两个Key通过网络请求获得一个AccessToken,API使用的操作流程,参考通用文字识别的API文档,文档地址如下。
https://ai.baidu.com/ai-doc/OCR/1k3h7y3db
在这里插入图片描述
        然后下滑找到获取Access_token部分,然后选择自己获取access_token的方式,这里选择python,然后我又对python获取Access_token的代码简单的进行了一些改造,然后输出。
在这里插入图片描述

改造之后的代码如下:

import requests
import json

api_key = "自己的api_key"
secret_key = "自己的secret_key"

def main():
    url = f"https://aip.baidubce.com/oauth/2.0/token?grant_type=client_credentials&client_id={api_key}&client_secret={secret_key}"

    headers = {
        'Content-Type': 'application/json',
        'Accept': 'application/json'
    }

    response = requests.post(url, headers=headers)  # 简化请求方式

    # 解析JSON响应体
    response_data = response.json()

    # 打印格式化后的JSON
    print(json.dumps(response_data, indent=4))  # 添加indent参数来美化输出 indent=4 表示现实的时候每个键值对前缩进几个空格


if __name__ == '__main__':
    main()

运行之后的结果如下,可以从打印输出部分找到access_token用于之后的APi调用
在这里插入图片描述

3.2 OCR 识别python代码部分

回到通用文字识别(高精度版)https://cloud.baidu.com/doc/OCR/s/1k3h7y3db
在这里插入图片描述
下划到请求代码示例的部分,然后找到这个python示例的代码
在这里插入图片描述


# encoding:utf-8

import requests
import base64

'''
通用文字识别(高精度版,高精度含位置版,标准版,标准含位置版)
切换不同的request_url就能使用不同版本的百度OCR识别
'''

# 高精度版
# request_url = "https://aip.baidubce.com/rest/2.0/ocr/v1/accurate_basic"

# 高精度含位置版
request_url = "https://aip.baidubce.com/rest/2.0/ocr/v1/accurate"

# 标准版
# request_url = "https://aip.baidubce.com/rest/2.0/ocr/v1/general_basic"

# 标准含位置版
# request_url = "https://aip.baidubce.com/rest/2.0/ocr/v1/general"

# 二进制方式打开图片文件
f = open('长垣县人民医院体检报告单_00.png', 'rb')
img = base64.b64encode(f.read())

params = {"image":img}
access_token = '*****************************************'  #换成自己的access_token
request_url = request_url + "?access_token=" + access_token
headers = {'content-type': 'application/x-www-form-urlencoded'}
response = requests.post(request_url, data=params, headers=headers)

if response:
    print(response.json())

这里我找了一个病例文档进行测试,测试图片如下:
在这里插入图片描述

高精度版运行结果如下:

{'words_result': [{'words': '长垣县人民医院体检报告单'}, {'words': '体检日期:'}, {'words': '体检号:'}, {'words': '姓名'}, {'words': '性别'}, {'words': '年龄'}, {'words': '婚否'}, {'words': '电话或住址'}, {'words': '单位'}, {'words': '既往病史'}, {'words': '身高'}, {'words': '体重'}, {'words': '左'}, {'words': '裸眼'}, {'words': '矫正'}, {'words': '单色识别'}, {'words': '眼科'}, {'words': '右'}, {'words': '视力'}, {'words': '视力'}, {'words': '彩色及编号'}, {'words': '医生签字:'}, {'words': '其他眼疾'}, {'words': '血压:'}, {'words': 'mmhg'}, {'words': '心率:'}, {'words': '次/分'}, {'words': '内科'}, {'words': '脾:听诊'}, {'words': '性'}, {'words': '心:听诊'}, {'words': '性'}, {'words': '医生签字:'}, {'words': '肝:肋下'}, {'words': '及'}, {'words': '脾:肋下及'}, {'words': '其他:'}, {'words': '化验结果'}, {'words': '项目名称'}, {'words': '检查结果'}, {'words': '单位'}, {'words': '参考值'}, {'words': '项目名称'}, {'words': '检查结果'}, {'words': '单位'}, {'words': '参考值'}, {'words': '谷丙转氨酶'}, {'words': 'U/L'}, {'words': '0-40'}, {'words': '肺部【光检查:两肺】'}, {'words': '(未见可见)活动性病变。'}, {'words': '医生签字:'}, {'words': '以上体检结论:'}, {'words': '体检单位签章'}, {'words': '体检医师:'}], 'words_result_num': 55, 'log_id': 1801536176318950955}

高精度含位置版结果如下:
含位置版本,除了字符结果之外,还会有位置参数,类似于目标检测一类算法的输出结果,会给左上角的坐标点和宽高,默认识别页面的左上角坐标是(0,0)

{'words_result': [{'words': '长垣县人民医院体检报告单', 'location': {'top': 243, 'left': 673, 'width': 638, 'height': 62}}, {'words': '体检日期:', 'location': {'top': 352, 'left': 299, 'width': 194, 'height': 53}}, {'words': '体检号:', 'location': {'top': 352, 'left': 1116, 'width': 148, 'height': 53}}, {'words': '姓名', 'location': {'top': 468, 'left': 350, 'width': 88, 'height': 48}}, {'words': '性别', 'location': {'top': 467, 'left': 777, 'width': 90, 'height': 48}}, {'words': '年龄', 'location': {'top': 468, 'left': 1176, 'width': 92, 'height': 47}}, {'words': '婚否', 'location': {'top': 572, 'left': 350, 'width': 91, 'height': 48}}, {'words': '电话或住址', 'location': {'top': 569, 'left': 714, 'width': 225, 'height': 54}}, {'words': '单位', 'location': {'top': 678, 'left': 352, 'width': 89, 'height': 48}}, {'words': '既往病史', 'location': {'top': 781, 'left': 302, 'width': 183, 'height': 53}}, {'words': '身高', 'location': {'top': 890, 'left': 303, 'width': 88, 'height': 48}}, {'words': '体重', 'location': {'top': 890, 'left': 856, 'width': 91, 'height': 48}}, {'words': '左', 'location': {'top': 992, 'left': 529, 'width': 49, 'height': 53}}, {'words': '裸眼', 'location': {'top': 997, 'left': 623, 'width': 92, 'height': 46}}, {'words': '矫正', 'location': {'top': 994, 'left': 931, 'width': 92, 'height': 48}}, {'words': '单色识别', 'location': {'top': 992, 'left': 1195, 'width': 180, 'height': 54}}, {'words': '眼科', 'location': {'top': 1099, 'left': 303, 'width': 91, 'height': 47}}, {'words': '右', 'location': {'top': 1099, 'left': 529, 'width': 48, 'height': 51}}, {'words': '视力', 'location': {'top': 1101, 'left': 624, 'width': 91, 'height': 48}}, {'words': '视力', 'location': {'top': 1101, 'left': 930, 'width': 92, 'height': 48}}, {'words': '彩色及编号', 'location': {'top': 1099, 'left': 1191, 'width': 213, 'height': 50}}, {'words': '医生签字:', 'location': {'top': 1100, 'left': 1409, 'width': 185, 'height': 50}}, {'words': '其他眼疾', 'location': {'top': 1204, 'left': 531, 'width': 184, 'height': 53}}, {'words': '血压:', 'location': {'top': 1310, 'left': 532, 'width': 101, 'height': 50}}, {'words': 'mmhg', 'location': {'top': 1317, 'left': 787, 'width': 119, 'height': 49}}, {'words': '心率:', 'location': {'top': 1310, 'left': 1074, 'width': 102, 'height': 52}}, {'words': '次/分', 'location': {'top': 1312, 'left': 1289, 'width': 102, 'height': 50}}, {'words': '内科', 'location': {'top': 1415, 'left': 308, 'width': 88, 'height': 49}}, {'words': '脾:听诊', 'location': {'top': 1417, 'left': 530, 'width': 150, 'height': 53}}, {'words': '性', 'location': {'top': 1414, 'left': 796, 'width': 51, 'height': 54}}, {'words': '心:听诊', 'location': {'top': 1416, 'left': 1074, 'width': 176, 'height': 50}}, {'words': '性', 'location': {'top': 1414, 'left': 1313, 'width': 51, 'height': 54}}, {'words': '医生签字:', 'location': {'top': 1415, 'left': 1408, 'width': 187, 'height': 51}}, {'words': '肝:肋下', 'location': {'top': 1520, 'left': 531, 'width': 181, 'height': 53}}, {'words': '及', 'location': {'top': 1522, 'left': 832, 'width': 49, 'height': 52}}, {'words': '脾:肋下及', 'location': {'top': 1519, 'left': 1074, 'width': 319, 'height': 56}}, {'words': '其他:', 'location': {'top': 1626, 'left': 530, 'width': 103, 'height': 53}}, {'words': '化验结果', 'location': {'top': 1726, 'left': 898, 'width': 182, 'height': 53}}, {'words': '项目名称', 'location': {'top': 1860, 'left': 300, 'width': 158, 'height': 47}}, {'words': '检查结果', 'location': {'top': 1859, 'left': 496, 'width': 161, 'height': 48}}, {'words': '单位', 'location': {'top': 1860, 'left': 697, 'width': 80, 'height': 45}}, {'words': '参考值', 'location': {'top': 1859, 'left': 818, 'width': 118, 'height': 49}}, {'words': '项目名称', 'location': {'top': 1858, 'left': 977, 'width': 160, 'height': 49}}, {'words': '检查结果', 'location': {'top': 1858, 'left': 1178, 'width': 160, 'height': 49}}, {'words': '单位', 'location': {'top': 1860, 'left': 1377, 'width': 80, 'height': 46}}, {'words': '参考值', 'location': {'top': 1859, 'left': 1496, 'width': 119, 'height': 49}}, {'words': '谷丙转氨酶', 'location': {'top': 1970, 'left': 299, 'width': 235, 'height': 54}}, {'words': 'U/L', 'location': {'top': 1976, 'left': 629, 'width': 68, 'height': 46}}, {'words': '0-40', 'location': {'top': 1976, 'left': 783, 'width': 88, 'height': 45}}, {'words': '肺部【光检查:两肺】', 'location': {'top': 2074, 'left': 297, 'width': 444, 'height': 56}}, {'words': '(未见可见)活动性病变。', 'location': {'top': 2076, 'left': 862, 'width': 497, 'height': 54}}, {'words': '医生签字:', 'location': {'top': 2076, 'left': 1429, 'width': 192, 'height': 51}}, {'words': '以上体检结论:', 'location': {'top': 2180, 'left': 308, 'width': 279, 'height': 53}}, {'words': '体检单位签章', 'location': {'top': 2213, 'left': 1427, 'width': 236, 'height': 48}}, {'words': '体检医师:', 'location': {'top': 2380, 'left': 299, 'width': 194, 'height': 54}}], 'words_result_num': 55, 'log_id': 1801539915093494463}

标准版识别结果,时间上会快一些:

{'words_result': [{'words': '长垣县人民医院体检报告单'}, {'words': '体检日期:'}, {'words': '体检号:'}, {'words': '姓名'}, {'words': '性别'}, {'words': '年龄'}, {'words': '婚否'}, {'words': '电话或住址'}, {'words': '单位'}, {'words': '既往病史'}, {'words': '身高'}, {'words': '体重'}, {'words': '左'}, {'words': '裸眼'}, {'words': '矫正'}, {'words': '单色识别'}, {'words': '眼科'}, {'words': '右'}, {'words': '视力'}, {'words': '视力'}, {'words': '彩色及编号医生签字:'}, {'words': '其他眼疾'}, {'words': '血压:'}, {'words': 'mmhg'}, {'words': '心率:'}, {'words': '次/分'}, {'words': '内科'}, {'words': '脾:听诊'}, {'words': '性'}, {'words': '心:听诊'}, {'words': '性'}, {'words': '医生签字:'}, {'words': '肝:肋下'}, {'words': '及'}, {'words': '脾:肋下'}, {'words': '及'}, {'words': '其他:'}, {'words': '化验结果'}, {'words': '项目名称检查结果'}, {'words': '单位参考值项目名称'}, {'words': '检查结果单位参考值'}, {'words': '谷丙转氨酶'}, {'words': 'U/L'}, {'words': '0-40'}, {'words': '肺部【光检查:两肺】'}, {'words': '(未见可见)活动性病变。'}, {'words': '医生签字:'}, {'words': '以上体检结论:'}, {'words': '体检单位签章'}, {'words': '体检医师:'}], 'words_result_num': 50, 'log_id': 1801541714667838725}

标准含位置版识别结果:

{'words_result': [{'words': '长垣县人民医院体检报告单', 'location': {'top': 247, 'left': 675, 'width': 632, 'height': 52}}, {'words': '体检日期:', 'location': {'top': 348, 'left': 297, 'width': 201, 'height': 58}}, {'words': '体检号:', 'location': {'top': 350, 'left': 1115, 'width': 157, 'height': 54}}, {'words': '姓名', 'location': {'top': 464, 'left': 345, 'width': 101, 'height': 54}}, {'words': '性别', 'location': {'top': 464, 'left': 771, 'width': 101, 'height': 54}}, {'words': '年龄', 'location': {'top': 464, 'left': 1174, 'width': 97, 'height': 54}}, {'words': '婚否', 'location': {'top': 569, 'left': 345, 'width': 101, 'height': 54}}, {'words': '电话或住址', 'location': {'top': 569, 'left': 709, 'width': 232, 'height': 52}}, {'words': '单位', 'location': {'top': 674, 'left': 345, 'width': 101, 'height': 52}}, {'words': '既往病史', 'location': {'top': 779, 'left': 301, 'width': 187, 'height': 52}}, {'words': '身高', 'location': {'top': 887, 'left': 298, 'width': 101, 'height': 52}}, {'words': '体重', 'location': {'top': 885, 'left': 853, 'width': 101, 'height': 54}}, {'words': '左', 'location': {'top': 990, 'left': 526, 'width': 56, 'height': 52}}, {'words': '裸眼', 'location': {'top': 993, 'left': 619, 'width': 104, 'height': 52}}, {'words': '矫正', 'location': {'top': 990, 'left': 926, 'width': 104, 'height': 54}}, {'words': '单色识别', 'location': {'top': 993, 'left': 1192, 'width': 187, 'height': 52}}, {'words': '眼科', 'location': {'top': 1096, 'left': 298, 'width': 101, 'height': 54}}, {'words': '右', 'location': {'top': 1098, 'left': 526, 'width': 53, 'height': 52}}, {'words': '视力', 'location': {'top': 1098, 'left': 622, 'width': 97, 'height': 54}}, {'words': '视力', 'location': {'top': 1098, 'left': 926, 'width': 104, 'height': 52}}, {'words': '彩色及编号医生签字:', 'location': {'top': 1098, 'left': 1187, 'width': 413, 'height': 52}}, {'words': '其他眼疾', 'location': {'top': 1202, 'left': 526, 'width': 193, 'height': 54}}, {'words': '血压:', 'location': {'top': 1315, 'left': 528, 'width': 109, 'height': 43}}, {'words': 'mmhg', 'location': {'top': 1323, 'left': 787, 'width': 123, 'height': 39}}, {'words': '心率:', 'location': {'top': 1308, 'left': 1070, 'width': 115, 'height': 54}}, {'words': '次/分', 'location': {'top': 1308, 'left': 1283, 'width': 106, 'height': 54}}, {'words': '内科', 'location': {'top': 1411, 'left': 301, 'width': 101, 'height': 54}}, {'words': '脾:听诊', 'location': {'top': 1416, 'left': 528, 'width': 152, 'height': 52}}, {'words': '性', 'location': {'top': 1411, 'left': 794, 'width': 58, 'height': 57}}, {'words': '心:听诊', 'location': {'top': 1412, 'left': 1072, 'width': 237, 'height': 52}}, {'words': '性', 'location': {'top': 1413, 'left': 1312, 'width': 53, 'height': 52}}, {'words': '医生签字:', 'location': {'top': 1413, 'left': 1404, 'width': 197, 'height': 56}}, {'words': '肝:肋下', 'location': {'top': 1516, 'left': 527, 'width': 190, 'height': 60}}, {'words': '及', 'location': {'top': 1519, 'left': 827, 'width': 56, 'height': 54}}, {'words': '脾:肋下', 'location': {'top': 1522, 'left': 1070, 'width': 200, 'height': 52}}, {'words': '及', 'location': {'top': 1522, 'left': 1346, 'width': 50, 'height': 52}}, {'words': '其他:', 'location': {'top': 1624, 'left': 528, 'width': 109, 'height': 54}}, {'words': '化验结果', 'location': {'top': 1720, 'left': 897, 'width': 186, 'height': 57}}, {'words': '项目名称检查结果', 'location': {'top': 1860, 'left': 301, 'width': 400, 'height': 41}}, {'words': '单位参考值项目名称', 'location': {'top': 1860, 'left': 696, 'width': 480, 'height': 43}}, {'words': '检查结果单位参考值', 'location': {'top': 1860, 'left': 1176, 'width': 438, 'height': 43}}, {'words': '谷丙转氨酶', 'location': {'top': 1968, 'left': 301, 'width': 235, 'height': 52}}, {'words': 'U/L', 'location': {'top': 1972, 'left': 624, 'width': 75, 'height': 52}}, {'words': '0-40', 'location': {'top': 1978, 'left': 782, 'width': 89, 'height': 39}}, {'words': '肺部【光检查:两肺】', 'location': {'top': 2074, 'left': 298, 'width': 448, 'height': 52}}, {'words': '(未见可见)活动性病变。', 'location': {'top': 2074, 'left': 861, 'width': 498, 'height': 53}}, {'words': '医生签字:', 'location': {'top': 2077, 'left': 1427, 'width': 200, 'height': 52}}, {'words': '以上体检结论:', 'location': {'top': 2179, 'left': 306, 'width': 283, 'height': 52}}, {'words': '体检单位签章', 'location': {'top': 2215, 'left': 1427, 'width': 238, 'height': 43}}, {'words': '体检医师:', 'location': {'top': 2378, 'left': 301, 'width': 195, 'height': 54}}], 'words_result_num': 50, 'log_id': 1801542280884898583}

4.结束


总体用下来感觉还挺简单的,缺点是需要网络环境而且需要花钱,但是对于学习基本的OCR操作流程来说应该是一个不错的选择。

附加—付费开通(如果没有免费试用的话)

然后进入到如下界面,点一下通用文字识别的开通。
在这里插入图片描述
进入之后接某名称这里点一下全选这样之后就都能用了,之后底部还有一个协议需要勾选,然后点确认开通。
在这里插入图片描述
然后就提示你需要充钱了
在这里插入图片描述
然后选微信支付重10块钱意思一下。
在这里插入图片描述
好现在已经有10块钱了。
在这里插入图片描述

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/1822820.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

浅谈数据管理架构 Data Fabric(数据编织)及其关键特征、落地应用

伴随着企业从数字化转型迈向更先进的数智化运营新阶段,对看数、用数的依赖越来越强,但数据的海量增长给数据管理带来一系列难题,如数据类型和加工链路日益复杂,数据存储和计算引擎更加分散,数据需求响应与数据质量、数…

【电机控制】FOC算法验证步骤——PWM、ADC

【电机控制】FOC算法验证步骤 文章目录 前言一、PWM——不接电机1、PWMA-H-50%2、PWMB-H-25%3、PWMC-H-0%4、PWMA-L-50%5、PWMB-L-75%6、PWMC-L-100% 二、ADC——不接电机1.电流零点稳定性、ADC读取的OFFSET2.电流钳准备3.运放电路分析1.电路OFFSET2.AOP3.采样电路的采样值范围…

kubespray离线安装k8s

kubespray离线安装k8s 系统环境 OS: Static hostname: test Icon name: computer-vm Chassis: vm Machine ID: 22349ac6f9ba406293d0541bcba7c05d Boot ID: 83bb7e5dbf27453c94ff9f1fe88d5f02 Virtualization: vmware Operating System: Ubuntu 22.04.4 LTS Kernel: Linux 5.…

哪个牌子的开放式耳机性价比高呢?五大口碑销量双佳产品汇总!

​喜欢户外活动的朋友们,你们都是懂得享受生活的达人吧!想象一下,在户外活动时,如果能有一副既适合场景又提供超棒音乐体验的耳机,那该多完美啊!这时候,开放式耳机就闪亮登场了!它的…

JAVAEE值之网络原理(1)_用户数据报协议(UDP)、概念、特点、结构、代码实例

前言 在前两节中我们介绍了UDP数据报套接字编程,但是并没有对UDP进行详细介绍,本节中我们将会详细介绍传输层中的UDP协议。 一、什么是UDP? UDP工作在传输层,用于程序之间传输数据的。数据一般包含:文件类型&#xff0…

SpringCloud2023 - 学习笔记

文章目录 1. 简介1.1 基础知识1.2 组件更替与升级 2. 微服务基础项目构建2.1 创建项目2.2 Mapper4生成代码2.3 支付模块编码2.4 项目完善2.5 订单模块编码2.6 工程重构 3. consul服务注册与发现3.1 consul简介3.2 consul下载安装3.3 微服务入驻3.4 order订单微服务入驻3.5 其他…

美摄科技匿名化处理解决方案,包含模糊、同色、马赛克、效果遮挡等各种形式

信息安全已成为企业发展中不可忽视的重要一环,随着信息安全法规的日益严格和公众对个人隐私保护意识的不断提高,企业如何在保障业务顺畅进行的同时,满足信息安全和隐私保护的要求,成为了亟待解决的问题。美摄科技凭借其强大的技术…

手把手搭建 Nginx + VIP + Keepalived 高可用集群

文章目录 1、前置讲解1.1、常用方案1.2、实现流程 2、集群搭建2.1、环境准备2.2、关于 Nginx2.2.1、安装 Nginx2.2.2、调整 Nginx 首页 2.3、关于 Keepalived2.3.1、安装 Keepalived2.3.2、编写 Shell2.3.3、调整 KeepAlived 配置 1、前置讲解 其实阿里云ECS本身不支持使用服务…

Kubernetes集群持久化部署实践

WordPress 网站持久化部署 要持久化MariaDB 可以把 Deployment 改成了 StatefulSet,修改 YAML添加“serviceName”“volumeClaimTemplates”这两个字段,定义网络标识和 NFS 动态存储卷,然后在容器部分用“volumeMounts”挂载到容器里的数据目…

一文搞懂阻塞赋值和非阻塞赋值

目录 2.非阻塞赋值举例3.阻塞赋值举例4.总结 微信公众号获取更多FPGA相关源码: # 1.阻塞赋值和非阻塞赋值的区别: (1)阻塞赋值"",必须是阻塞赋值完成后,才进行下一条语句的执行;赋值一旦完成,等号…

docker环境中配置phpstorm php xdebug调试工具

本文介绍通过docker compose的使用方式 第一步:在php镜像中安装phpxdebug扩展,比如php7.4对应的是xdebug3.1.6 第二步:设置项目中的docker-compose.yml docker-compose 增加开启xdebug的环境变量,host.docker.internal是宿主机的地址&#…

MBTI:探索你的性格类型

人不走空 🌈个人主页:人不走空 💖系列专栏:算法专题 ⏰诗词歌赋:斯是陋室,惟吾德馨 目录 🌈个人主页:人不走空 💖系列专栏:算法专题 ⏰诗词歌…

4.音视频 AAC SSAASS

目录 AAC 1.什么是ADIF和ADTS? 2.ADTS的数据结构是怎样的? SSA/ASS 1.SSA/ASS的基本结构 AAC AAC(Advanced Audio Coding,高级音频编码)是一种声音数据的文件压缩格式。AAC分为ADIF和ADTS两种文件格式。 1.什么是ADIF和ADTS&#xff…

Day01 C语言嵌入式

目录 1、嵌入式知识体系 2、计算机的组成原理 3、计算机之父 4、C语言标准 5、关键字 6、字符编码 7、字符集 1、嵌入式知识体系 备注:图片来源于网络,为嵌入式知识体系思维导图,分为软件、硬件和理论知识三个部分,仅供各位…

【LeetCode】4,寻找两个正序数组中的中位数

题目地址 B站那个官方解答视频实在看不懂,我就根据他那个代码和自己的理解写一篇文章 1. 基本思路 在只有一个有序数组的时候,中位数把数组分割成两个部分。中位数的定义:中位数,又称中点数,中值。中位数是按顺序排列…

全志摄像头屏幕预览、录制(H264)

一、录像 使用dvr_test录制视频 运行dvr_test demo出现space not enought问题,修改/etc/dvrconfig.ini文件下对应的camera节点下cur_filedir属性无效 修改以下内容解决; 录制时出现摄像头画面异常,如下 摄像头型号与打印信息匹配: 但是出现画…

整蛊软件/插件使用方法与配置步骤~

今天出一期整蛊软件的使用方法与配置步骤 很多人在使用整蛊软件的时候 想自己添加更多的玩法内容 但是还不知道如何去配置 这期给大家出一下图文教程步骤 基本上也是软件的功能介绍使用方式~ 案例可扫码查看 第一步:打开软件输入卡密登录: 卡密费用&…

最好用的邮箱管理软件推荐,邮箱管理软件哪个好?(干货篇)

在快节奏的工作与生活中,有效管理电子邮件成为提升个人与团队效率的关键。 面对海量信息流,一款好的邮箱管理软件不仅能够帮助我们高效地整理收件箱,还能确保重要邮件不会错过,同时提升通讯的便捷性和安全性。 本文将为您推荐几款…

AUTOSAR平台中的信息安全标准模块

面向MCU端的AUTOSAR CP平台加密组件——Crypto ECU中所有的软件单元都遭受到信息安全攻击的可能。AUTOSAR为保障ECU信息和数据安全,定义了CRYPTO 组件,包含 SecOC、KeyM、IdsM、Csm、CryIf 和Crypto Driver 等标准模块。CRYPTO组件提供各种加解密算法以及密钥管理功…

另辟蹊径的终端防病毒

在数字时代的浪潮中,网络安全问题愈发凸显,防病毒成为了保护信息安全的重要一环。而白名单作为一种有效的安全策略,在防病毒方面发挥着不可或缺的作用。 首先,我们需要明确白名单的概念。白名单是一种管理和安全实践,用…