52 lines
2.5 KiB
C#
52 lines
2.5 KiB
C#
/*
|
|
* Copyright (c) 2025 LG Electronics Inc.
|
|
* SPDX-License-Identifier: LicenseRef-LGE-Proprietary
|
|
*/
|
|
namespace VisionCommon {
|
|
public class AutoFocusRecipe {
|
|
public int BestStep { get; set; } = 0;
|
|
public int BestSharpness { get; set; } = 0;
|
|
public double BestPos { get; set; } = 0; // 최적의 위치
|
|
public double BackStep_1 { get; set; } = 1.5; // [1차] 시작시 뒤로 갈 이동량 (mm)
|
|
public double MoveStep_1 { get; set; } = 0.1; // [1차] 한 스텝 이동량 (mm)
|
|
public int MaxStepCnt_1 { get; set; } = 30; // [1차] 최대 스텝 횟수 (총 3mm 이동)
|
|
public double BackStep_2 { get; set; } = 0.1; // [2차] 시작시 뒤로 갈 이동량 (mm)
|
|
public double MoveStep_2 { get; set; } = 0.01; // [2차] 한 스텝 이동량 (mm)
|
|
public int MaxStepCnt_2 { get; set; } = 20; // [2차] 최대 스텝 횟수 (총 0.2mm 이동)
|
|
public eAxis Axis { get; set; } = eAxis.Z;
|
|
public eDirection Direction { get; set; } = eDirection.Plus;
|
|
public ROI SharpnessRoi { get; set; } = new ROI() { CenterX = 1000, CenterY = 1000, Width = 200, Height = 300 };
|
|
|
|
public AutoFocusRecipe Clone() {
|
|
return new AutoFocusRecipe() {
|
|
BestStep = this.BestStep,
|
|
BestSharpness = this.BestSharpness,
|
|
BestPos = this.BestPos,
|
|
BackStep_1 = this.BackStep_1,
|
|
MoveStep_1 = this.MoveStep_1,
|
|
MaxStepCnt_1 = this.MaxStepCnt_1,
|
|
BackStep_2 = this.BackStep_2,
|
|
MoveStep_2 = this.MoveStep_2,
|
|
MaxStepCnt_2 = this.MaxStepCnt_2,
|
|
Axis = this.Axis,
|
|
Direction = this.Direction,
|
|
SharpnessRoi = this.SharpnessRoi,
|
|
};
|
|
}
|
|
|
|
public void CopyTo(AutoFocusRecipe target) {
|
|
target.BestStep = this.BestStep;
|
|
target.BestSharpness = this.BestSharpness;
|
|
target.BestPos = this.BestPos;
|
|
target.BackStep_1 = this.BackStep_1;
|
|
target.MoveStep_1 = this.MoveStep_1;
|
|
target.MaxStepCnt_1 = this.MaxStepCnt_1;
|
|
target.BackStep_2 = this.BackStep_2;
|
|
target.MoveStep_2 = this.MoveStep_2;
|
|
target.MaxStepCnt_2 = this.MaxStepCnt_2;
|
|
target.Axis = this.Axis;
|
|
target.Direction = this.Direction;
|
|
target.SharpnessRoi = this.SharpnessRoi;
|
|
}
|
|
}
|
|
} |