跳到主要内容

FTP Image Export ←OV DOCS 21524ca125828044bb6adc77f3023efa

draft: true

FTP Image Export

本页提供将 OV80i 相机配置为自动将捕获的图像发送到远程 FTP 服务器以进行归档、分析或与外部系统集成的分步说明。

Use Case: FTP export 是理想的方案,用于将检测图像发送到网络存储、云服务或支持 FTP 文件传输的第三方分析系统。

Prerequisites

在配置 FTP 导出之前,请确保您具备:

  • FTP server details - 主机地址、凭据和文件夹路径
  • Network connectivity - 相机与 FTP 服务器在同一网络或可路由路径上
  • Sufficient storage - FTP 服务器有用于图像文件的足够存储空间
  • Firewall configuration - FTP 通信所需的端口 20-21 已打开

Step-by-Step Configuration

1. Access FTP Configuration

  • 导航至相机的网页界面
  • 转到 Recipe Editor
  • 点击 Configure FTP 以打开配置模态框

2. Enable FTP Communication

Toggle FTP Status:

  • Enable - 启用 FTP 通信
  • Disable - 禁用 FTP 通信(默认)
提示

在初始设置阶段保持禁用,测试配置后再启用。

3. Configure Server Connection

Server Host Settings:

FieldDescriptionExampleServer HostNetwork address of FTP server192.168.1.100 orftp.company.comFTP Remote PathSubfolder on server for images/inspection_images/line_1/

Example Configurations:

  • Local NAS: 192.168.1.50 路径 /camera_data/ov80i/
  • Cloud FTP: files.cloudprovider.com 路径 /production/quality/
  • Root Directory:FTP Remote Path 留空以保存到服务器根目录

4. Set Authentication Credentials

Login Information:

FieldRequiredNotesFTP User✅ YesUsername for FTP server accessFTP Password✅ YesPassword for FTP authentication
备注

Credentials are stored locally on camera. Use dedicated FTP account with limited permissions.

凭据存储在相机本地。请使用具有限制权限的专用 FTP 帐户。

5. Configure Output Options

Filename Customization:

OptionPurposeExample ResultAdd Trigger ID to FilenameUnique identifier for Library searchimage_T001234.jpgAdd Timestamp to FilenameDate/time informationimage_20250620_143052.jpgBoth OptionsMaximum traceabilityimage_T001234_20250620_143052.jpg

Recommended Settings:

  • Add Trigger ID - 对于跟踪特定检测至关重要
  • Add Timestamp - 有助于按时间顺序组织

6. Configure Firewall Settings

Passive Mode Selection:

ModeWhen to UseFirewall CompatibilityPassive Mode ONCamera behind firewallBetter compatibilityPassive Mode OFFDirect network connectionMay require port configuration

Default Recommendation: Enable Passive Mode unless you have specific network requirements.

Testing Your Configuration

1. Test Image Capture

  • Manual Trigger: 使用相机界面捕获测试图像
  • Digital Trigger: 如果使用外部触发,请发送触发信号
  • Verify Capture: 确认图像已出现在相机的本地存储中

2. Verify FTP Transfer

Check FTP Server:

  • 导航至已配置的 FTP Remote Path
  • 查找最近传输的图像文件
  • 验证文件名包含配置的选项(Trigger ID、Timestamp)

Expected Filename Format:


image_T001234_20250620_143052.jpg
└─────┘ └────┘ └──────────────┘
Base Trigger Timestamp
ID (YYYYMMDD_HHMMSS)

3. 测试多张捕获

  • 连续捕获多张图像
  • 验证所有图像是否成功传输
  • 检查是否存在文件命名冲突或覆盖

Troubleshooting Common Issues

Connection Failed

现象:

  • 图像已捕获但未在 FTP 服务器上显示
  • 相机日志中的错误信息

解决方法:

  1. 网络验证: 从相机网络对 FTP 服务器进行 Ping
  2. 凭据检查: 使用 FTP 客户端软件测试登录
  3. 防火墙设置: 如在防火墙后,请启用 Passive Mode
  4. 服务器容量: 确保 FTP 服务器有可用存储空间

File Permission Errors

现象:

  • 连接成功但文件未保存
  • 错误日志中的 “Permission denied”

解决方法:

  1. 用户权限: 验证 FTP 用户对目标文件夹具有写入权限
  2. 文件夹创建: 确保服务器上存在 FTP Remote Path 文件夹
  3. 磁盘空间: 检查 FTP 服务器的可用存储空间

Intermittent Transfers

现象:

  • 某些图像已传输,其他未传输
  • 间歇性连接问题

解决方法:

  1. 网络稳定性: 检查网络拥塞或连通性问题
  2. 服务器负载: 验证 FTP 服务器未超载
  3. 文件大小: 大尺寸图像在慢速连接时可能超时

FTP Export Best Practices

File Organization Strategy

文件夹结构示例:


/inspection_data/
├── line_1/
│ ├── 2025/06/20/
│ └── defects/
├── line_2/
└── archive/

命名约定:

  • 在 FTP Remote Path 中包含 Recipe Name/quality_control/pcb_inspection/
  • 使用 Trigger ID 以实现对特定检查的可追溯性
  • 添加 Timestamp 以实现按时间排序

Performance Optimization

网络考虑:

  • Image Quality: 在文件大小与检查需求之间取得平衡
  • Transfer Frequency: 高速生产可能需要专用 FTP 服务器
  • Batch Processing: 考虑针对间歇性网络连接进行本地缓冲

Security Recommendations

FTP Account Setup:

  • 在 FTP 服务器上创建专用相机用户账户
  • 将权限限定在特定文件夹
  • 使用强且唯一的密码
  • 考虑 FTPS (FTP over SSL) 以实现加密传输

Advanced Configuration

Custom File Processing

Node-RED Integration:

  • 使用 Node-RED 流实现自定义文件名逻辑
  • 为传输的文件添加元数据
  • 根据检查结果实现有条件的 FTP 传输

参见:Node-RED Basics

Backup Strategies

冗余存储:

  • 配置多个 FTP 目的地
  • 本地存储作为备份保留
  • 自动清理旧文件

🔗 参阅