帆软函数TOIMAGE应用

例1.TOIMAGE应用并且点击图片放大

1.Toimage(path)用于在报表中显示某一路径path下的图片,path既可以为绝对路径,也可以为相对路径,既可以为固定的本地路径,也可以为从数据库中取出的动态数据,以下分别进行介绍。

TOIMAGE("C:/FineReport_8.0/WebReport/g5g6pic/" + A2 + ".JPG")

2.B2超级链接JavaScript 

以上JS同时兼容移动端

window.open("http://localhost:8075/WebReport/g5g6pic/"+a2+".jpg")//电脑端可用不支持移动端

R.doHyperlinkByGet({url:'ReportServer?reportlet=WorkBook1.cpt',title:'标题是我',para:{area:'华北'}});  //带参

数组函数http://help.finebi.com/doc-view-621.html

数值函数http://help.finebi.com/doc-view-225.html

典型函数应用http://help.finebi.com/doc-view-284.html

import json import cv2 import numpy as np from paddleocr import PaddleOCR import pandas as pd # 初始化OCR引擎(关闭不必要的检测模型) ocr = PaddleOCR( use_angle_cls=False, # 关闭方向分类(针对正方向文本) lang='ch', # 使用中文模型 det_db_unclip_ratio=1.5, # 调整检测框扩展比例(提升密集文本检测) ) image_path = 'SL16MC.jpg' # 读取图像 image = cv2.imread(image_path) with open("point.json", "r") as reader: config = json.loads(reader.read()) if image is None: print("无法加载图像") else: # 定义裁剪区域的左上角点和大小 # x, y, w, h = 38, 190, 85, 512 # 裁剪图像 results = [] for i in config["point"]: cropped_image = image[i["y"]:i["y"]+i["h"], i["x"]:i["x"]+i["w"]] # 执行OCR识别 result = ocr.ocr(cropped_image, cls=False) # 处理识别结果 texts = [] if result: for line in result[0]: text = line[1][0] # 过滤非字母数字字符(保留大小写字母、数字和中划线) filtered_text = ''.join([c for c in text if c.isalnum() or c == '-' or c == '.']) if filtered_text: texts.append(filtered_text) results.append({'name': i['name'], 'texts': texts}) else: results.append({'name': i['name'], 'texts': []}) # 创建DataFrame df = pd.DataFrame(results) df = df.set_index('name') df = df.transpose() df.columns.name = None df.reset_index(drop=True, inplace=True) df.columns = ['name','Standard', 'vlaue1', 'vlaue2', 'vlaue3'] # 保存到Excel文件 df.to_excel('output.xlsx', index=False) print("结果已保存到 output.xlsx") 以上代碼存入資料單元格為list,還請協助每個數據存一個單元格
最新发布
03-21
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值