|
|
|
@ -54,10 +54,12 @@ const CameraView = ({ |
|
|
|
const maxScale = 4.0; |
|
|
|
const scaleStep = 0.1; |
|
|
|
const maxRectangles = 5; |
|
|
|
|
|
|
|
let streamUrl = `http://${window.location.hostname}:2240/video_flow`; |
|
|
|
// 摄像头流地址 |
|
|
|
const streamUrl = `http://${window.location.hostname}:2240/video_flow`; // 生产用 |
|
|
|
// const streamUrl = `http://10.8.30.179:2240/video_flow`; //开发用 |
|
|
|
if (window.env && window.env.FS_FLAG === "localdev") { |
|
|
|
streamUrl = `http://10.8.30.179:2240/video_flow`; //开发用 |
|
|
|
} |
|
|
|
console.log(streamUrl,'测试') |
|
|
|
|
|
|
|
// 应用变换 |
|
|
|
const applyTransform = () => { |
|
|
|
@ -289,7 +291,9 @@ const CameraView = ({ |
|
|
|
|
|
|
|
const videoRect = screenToVideoCoordinates(x, y, w, h); |
|
|
|
if (videoRect && rectangles.length < maxRectangles) { |
|
|
|
const nextIndex = Number(rectangles[rectangles.length - 1]?.id) ? Number(rectangles[rectangles.length - 1]?.id)-100+1 : 1; |
|
|
|
const nextIndex = Number(rectangles[rectangles.length - 1]?.id) |
|
|
|
? Number(rectangles[rectangles.length - 1]?.id) - 100 + 1 |
|
|
|
: 1; |
|
|
|
const fixedId = `10${nextIndex}`; |
|
|
|
// 根据选中的模板预设参数 |
|
|
|
const templateParams = selectedTemplate |
|
|
|
@ -298,8 +302,7 @@ const CameraView = ({ |
|
|
|
name: `T_${nextIndex}` || selectedTemplate.name, |
|
|
|
radius: selectedTemplate.physicalRadius || 40.0, |
|
|
|
isReferencePoint: selectedTemplate.isBaseline || false, |
|
|
|
gradientThreshold: |
|
|
|
selectedTemplate.gradientThresholdValue, |
|
|
|
gradientThreshold: selectedTemplate.gradientThresholdValue, |
|
|
|
anchorThreshold: selectedTemplate.anchorThresholdValue, |
|
|
|
gaussianBlurThreshold: selectedTemplate.gaussianBlur || 3, |
|
|
|
binaryThreshold: selectedTemplate.binaryThreshold || 120, |
|
|
|
|