//---------------------------------------------------------------------------

#ifndef TabletCharacterExtractH
#define TabletCharacterExtractH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <Buttons.hpp>
#include <ExtCtrls.hpp>
#include <ComCtrls.hpp>
#include "Processing.h"
#include <Graphics.hpp>
#include "TntButtons.hpp"
#include "TntComCtrls.hpp"
#include "TntExtCtrls.hpp"
#include "TntStdCtrls.hpp"
#include "TntForms.hpp"
#include "TntGrids.hpp"
#include <Grids.hpp>
//---------------------------------------------------------------------------
#define MAX_ZOOM_W_PIXEL  1000
#define MAX_ZOOM_H_PIXEL  800
#define MAX_ZOOM_W_PIXEL_FOR3D  640
#define MAX_ZOOM_H_PIXEL_FOR3D  480
//---------------------------------------------------------------------------

#define THREE_D_NONE_MODE               0
#define THREE_D_NORMAL_MODE             1
#define THREE_D_BINARY_EXTRACTION_MODE  2
#define THREE_D_BINARY_REVISION_MODE    3

#define FRONT_GET_DATA_MODE_NONE        0
#define FRONT_GET_DATA_MODE_PRINT       1
#define FRONT_GET_DATA_MODE_SPLITLINE   2

#define PRINT_LABEL_EDIT_MODE_SELECT_LABEL    0
#define PRINT_LABEL_EDIT_MODE_APPLY_LABEL     1

#define PRINT_NEW     0
#define PRINT_MODIFY  1


class TTabletCharacterExtractForm : public TTntForm
{
__published:	// IDE-managed Components
    TTntGroupBox *GroupBox1;
    TTntImage *Image15;
    TTntImage *Image16;
    TTntGroupBox *GroupBox6;
    TTntButton *PrintManualExtractButton;
    TTntButton *PrintExtractWorkEndButton;
    TTntGroupBox *GroupBox7;
    TTntUpDown *UpDown1;
    TTntButton *BitBtn3;
    TTntButton *PrintMaskingButton;
    TTntImage *Image6;
    TTntStaticText *StaticText1;
    TTntButton *BitBtn7;
    TTntGroupBox *GroupBox8;
    TTntButton *ManualWorkEndButton;
    TTntPanel *Panel1;
    TTntImage *Image5;
    TTntGroupBox *GroupBox9;
    TTntImage *Image10;
    TTntUpDown *UpDown2;
    TTntSpeedButton *ManualDrawButton;
    TTntSpeedButton *ManualEraseButton;
    TTntImage *Image11;
    TTntImage *Image12;
    TTntImage *Image13;
    TTntGroupBox *GroupBox13;
    TTntGroupBox *GroupBox2;
    TTntImage *Image1;
    TTntGroupBox *GroupBox3;
    TTntImage *Image2;
    TTntGroupBox *GroupBox15;
    TTntImage *Image19;
    TTntProgressBar *ProgressBar1;
    TTntGroupBox *GroupBox16;
    TTntImage *CaptureImage1;
    TTntImage *CaptureImage2;
    TTntImage *CaptureImage3;
    TTntImage *CaptureImage4;
    TTntImage *CaptureImage5;
    TTntImage *CaptureImage11;
    TTntImage *CaptureImage12;
    TTntImage *CaptureImage13;
    TTntImage *CaptureImage14;
    TTntImage *CaptureImage15;
    TTntImage *CaptureImage16;
    TTntImage *CaptureImage17;
    TTntImage *CaptureImage18;
    TTntImage *CaptureImage19;
    TTntImage *CaptureImage20;
    TTntImage *CaptureImage21;
    TTntImage *CaptureImage22;
    TTntImage *CaptureImage23;
    TTntImage *CaptureImage24;
    TTntImage *CaptureImage25;
    TTntImage *CaptureImage6;
    TTntImage *CaptureImage7;
    TTntImage *CaptureImage8;
    TTntImage *CaptureImage9;
    TTntImage *CaptureImage10;
    TTntImage *CaptureImage26;
    TTntImage *CaptureImage27;
    TTntImage *CaptureImage28;
    TTntImage *CaptureImage29;
    TTntImage *CaptureImage30;
    TTntImage *Image20;
    TTntButton *BitBtn8;
    TTntSpeedButton *SpeedButton1;
    TTntSpeedButton *SpeedButton2;
    TTntButton *BitBtn9;
    TTntPanel *Panel5;
    TTntButton *BitBtn11;
    TTntButton *BitBtn12;
    TTntButton *BitBtn17;
    TTntGroupBox *GroupBox20;
    TTntPanel *Panel6;
    TTntPanel *Panel7;
    TTntPanel *Panel8;
    TTntButton *ImageSelectButton;
    TTntButton *BitBtn13;
    TTntButton *BitBtn14;
    TTntImage *Image24;
    TTntImage *Image25;
    TTntImage *Image26;
    TTntImage *Image27;
    TTntButton *BitBtn18;
    TTntGroupBox *GroupBox21;
    TTntPanel *Panel10;
    TTntImage *Image30;
    TTntButton *BitBtn20;
    TTntPanel *Panel11;
    TTntImage *Image31;
    TTntButton *BitBtn21;
    TTntButton *BitBtn19;
    TTntButton *ETC_InformationExtractButton;
    TTntGroupBox *GroupBox14;
    TTntImage *Image18;
    TTntStaticText *StaticText5;
    TTntButton *BitBtn4;
    TTntButton *BitBtn5;
    TTntUpDown *UpDown3;
    TTntGroupBox *GroupBox11;
    TTntImage *Image14;
    TTntGroupBox *GroupBox4;
    TTntGroupBox *GroupBox5;
    TTntGroupBox *GroupBox10;
    TTntButton *BitBtn2;
    TTntButton *BitBtn1;
    TTntGroupBox *GroupBox12;
    TTntImage *Image7;
    TTntStaticText *StaticText6;
    TTntUpDown *UpDown5;
    TTntButton *BitBtn10;
    TTntGroupBox *GroupBox17;
    TTntButton *ShapExtractButton;
    TTntButton *DiscrimiationMarkExtract;
    TTntGroupBox *GroupBox18;
    TTntButton *ThreeDDiscriminationExtractButton;
    TTntGroupBox *GroupBox19;
    TTntGroupBox *GroupBox22;
    TTntImage *Image32;
    TTntImage *Image33;
    TTntImage *Image34;
    TTntImage *Image35;
    TTntImage *Image36;
    TTntImage *Image37;
    TTntImage *Image38;
    TTntImage *Image39;
    TTntImage *Image40;
    TTntImage *Image41;
    TTntImage *Image42;
    TTntImage *Image43;
    TTntImage *Image44;
    TTntImage *Image45;
    TTntImage *Image46;
    TTntImage *Image47;
    TTntImage *Image48;
    TTntImage *Image49;
    TTntImage *Image50;
    TTntImage *Image51;
    TTntImage *Image52;
    TTntImage *Image53;
    TTntImage *Image54;
    TTntImage *Image55;
    TTntImage *Image56;
    TTntImage *Image57;
    TTntImage *Image58;
    TTntImage *Image59;
    TTntImage *Image60;
    TTntImage *Image61;
    TTntImage *Image17;
    TTntSpeedButton *SpeedButton6;
    TTntSpeedButton *SpeedButton7;
    TTntPanel *Panel2;
    TTntButton *BitBtn16;
    TTntButton *BitBtn22;
    TTntButton *BitBtn23;
    TTntGroupBox *GroupBox23;
    TTntButton *BitBtn24;
    TTntButton *BitBtn25;
    TTntButton *BitBtn26;
    TTntImage *Image21;
    TTntImage *Image22;
    TTntImage *Image23;
    TTntImage *Image28;
    TTntButton *BitBtn6;
    TTntGroupBox *GroupBox24;
    TTntLabel *Label1;
    TTntLabel *Label2;
    TTntButton *BitBtn15;
    TTntGroupBox *GroupBox25;
    TTntPanel *Panel3;
    TTntImage *Image29;
    TTntGroupBox *GroupBox26;
    TTntImage *Image62;
    TTntGroupBox *GroupBox27;
    TTntGroupBox *GroupBox28;
    TTntGroupBox *GroupBox29;
    TTntButton *BitBtn28;
    TTntImage *Image63;
    TTntImage *Image68;
    TTntImage *Image69;
    TTntPanel *Panel4;
    TTntStaticText *StaticText7;
    TTntImage *Image64;
    TTntImage *Image65;
    TTntImage *Image66;
    TTntPanel *Panel9;
    TTntStaticText *StaticText8;
    TTntUpDown *UpDown6;
    TTntImage *Image67;
    TTntPanel *Panel12;
    TTntStaticText *StaticText9;
    TTntSpeedButton *SpeedButton8;
    TTntSpeedButton *SpeedButton9;
    TTntPanel *Panel13;
    TTntScrollBar *ScrollBar1;
    TTntScrollBar *ScrollBar2;
    TTntStaticText *StaticText10;
    TTntStaticText *StaticText11;
    TTntStaticText *StaticText12;
    TTntScrollBar *ScrollBar3;
    TTntScrollBar *ScrollBar4;
    TTntPanel *Panel14;
    TTntLabel *Label4;
    TTntLabel *Label5;
    TTntRadioButton *RadioButton5;
    TTntRadioButton *RadioButton6;
    TTntPanel *Panel15;
    TTntProgressBar *ProgressBar2;
    TTntPanel *Panel16;
    TTntProgressBar *ProgressBar3;
    TTntGroupBox *GroupBox30;
    TTntUpDown *UpDown7;
    TTntImage *Image70;
    TTntButton *BitBtn32;
    TTntStaticText *StaticText13;
    TTntButton *BitBtn33;
    TTntGroupBox *GroupBox33;
    TTntImage *Image72;
    TTntImage *Image73;
  TTntGroupBox *PrintTHGB;
  TTntPanel *PrintTH;
  TTntUpDown *ThresholdUpDown;
  TTntGroupBox *TabletShapeSelectGB;
  TTntButton *shapeSelectionCancelBtn;
  TTntGroupBox *TntGroupBox2;
  TTntImage *shapeSelectImage1;
  TTntImage *shapeSelectImage4;
  TTntImage *shapeSelectImage7;
  TTntImage *shapeSelectImage10;
  TTntImage *shapeSelectImage2;
  TTntImage *shapeSelectImage5;
  TTntImage *shapeSelectImage8;
  TTntImage *shapeSelectImage11;
  TTntImage *shapeSelectImage3;
  TTntImage *shapeSelectImage6;
  TTntImage *shapeSelectImage9;
  TTntImage *shapeSelectImage12;
  TTntButton *shapeSelectionOKBtn;
  TTntPanel *Panel17;
  TTntImage *Image9;
  TTntGroupBox *ZoomOptionBox;
  TTntImage *zoomInOutImage;
  TTntPanel *Panel18;
  TTntImage *ZoomInImage;
  TTntPanel *Panel19;
  TTntImage *ZoomOutImage;
  TTntLabel *ZoomSizeLabel;
  TTntGroupBox *GroupBox31;
  TTntImage *Image71;
  TTntGroupBox *ZoomOptionBoxFor3D;
  TTntImage *zoomInOutNavigate3DImage;
  TTntLabel *ZoomSize3DLabel;
  TTntPanel *Panel20;
  TTntImage *zoomIn3DImage;
  TTntPanel *Panel21;
  TTntImage *zoomOut3DImage;
  TTntImage *SpecialEdgeImage;
  TTntImage *NormalEdgeImage;
  TTntImage *EmbossedImage;
  TTntButton *SetThresholdBtn;
  TTntImage *TntImage1;
  TTntLabel *Label3;
  TTntLabel *Label6;
  TTntButton *ExtractSplitLineBtn;
  TTntGroupBox *ExtractionSplitLineGroupBox;
  TTntPanel *TntPanel1;
  TTntImage *SplitLineSelectedImage;
  TTntButton *SplitLineImageSelectionBtn;
  TTntPanel *TntPanel2;
  TTntImage *ExtractedSplitLineImage;
  TTntButton *SplitLineExtractionBtn;
  TTntButton *TntBitBtn4;
  TTntButton *SimilarPrintSettingBtn;
  TTntPanel *SimilarPrintSettingPanel;
  TTntGroupBox *GroupBox32;
  TTntGroupBox *GroupBox34;
  TTntGroupBox *GroupBox35;
  TTntImage *PrintResultImage1;
  TTntImage *PrintResultImage2;
  TTntButton *CheckPrintSimliarResultBtn;
  TTntButton *PrintSimliarCheckCloseBtn;
  TTntGroupBox *SimilarPrintOptionGroupBox;
  TRadioButton *SimilarPrintDrawRadioBox;
  TRadioButton *SimilarPrintEraseRadioBox;
  TTntButton *InitSimilarPrintMaskBtn;
  TTntLabel *Label7;
  TEdit *SimilarPrintSettingSizeEdit;
  TTntButton *ApplyDiffPrintAreaBtn;
  TTntPanel *PrintSimilarCheckResultGroupBox;
  TTntImage *PrintABSimilarCheckResultImage;
  TProgressBar *PrintMatchingProgressBar;
  TTntLabel *Label8;
  TTntButton *SimilarPrintSettingBtn2;
  TTimer *SetupdataStatusTimer;
  TTntButton *GetThreeDInfoButton;
  TTntGroupBox *Extraction3DInfoGroupBox;
  TTntGroupBox *GroupBox36;
  TProgressBar *ThreeDImageProgressBar;
  TTntImage *CapturedThreeDImageDisk1;
  TTntImage *CapturedThreeDImageDisk2;
  TTntLabel *Label9;
  TTntLabel *Label10;
  TTntLabel *Disk1BestImageIndexLabel;
  TTntLabel *Disk2BestImageIndexLabel;
  TTntGroupBox *GetThreeDThresholdGroupBox;
  TTntImage *Disk1RotationThreeDImage;
  TTntImage *Disk2RotationThreeDImage;
  TTntLabel *Label11;
  TTntLabel *Label12;
  TTntLabel *Disk1ThresholdLabel;
  TTntLabel *Disk2ThresholdLabel;
  TProgressBar *RotationProgressbar;
  TTntGroupBox *NormalizedThreeDImageGroupBox;
  TTntImage *Disk1NormalizedThreeDImage;
  TTntImage *Disk2NormalizedThreeDImage;
  TTntLabel *Label13;
  TTntLabel *Label14;
  TTntLabel *Disk1NormalizedValueLabel;
  TTntLabel *Disk2NormalizedValueLabel;
  TProgressBar *NormalizedProgressbar;
  TCheckBox *RotationDataLoadCheckBox;
  TTntButton *ExtractThreeInfoCloseBtn;
  TCheckBox *NormalizedImageLoadCheckBox;
  TTntGroupBox *GroupBox37;
  TTntSpeedButton *SpeedButton3;
  TTntSpeedButton *SpeedButton4;
  TTntImage *Image4;
  TTntUpDown *PrintEditSizeOptionUpdownBtn;
  TTntGroupBox *GroupBox38;
  TTntSpeedButton *SpeedButton5;
  TTntUpDown *PrintEditThickOptionUpdownBtn;
  TTntPanel *Panel22;
  TTntImage *Image3;
  TTntImage *Image8;
  TTntGroupBox *GroupBox39;
  TTntSpeedButton *SpeedButton10;
  TTntSpeedButton *SpeedButton11;
  TTntSpeedButton *SpeedButton12;
  TTntSpeedButton *SpeedButton13;
  TTntPanel *Panel23;
  TTntLabel *Label15;
  TTntGroupBox *GroupBox40;
  TTntSpeedButton *PrintLabelEditOptionBtn1;
  TTntSpeedButton *PrintLabelEditOptionBtn2;
  TTntPanel *Panel24;
  TTntButton *TntBitBtn1;
  TTntButton *TntBitBtn2;
  TTntButton *ReadHistoryButton;
  TTntPanel *SetupDataHistoryPanel;
  TTntButton *HistoryCloseButton;
  TPanel *Panel25;
  TTntStringGrid *HistoryGrid;
  TTntLabel *SetupBackupPathLabel;
  TTntLabel *SelectedFileLabel;
  TTntButton *ApplySetupDataButton;
  TTntLabel *CurrentSetupDataIDLabel;
  TTntGroupBox *SetThresholdPanel;
  TTntImage *srcSideFaceImageCam2;
  TTntImage *srcSideFaceImageCam3;
  TTntImage *srcSideFaceImageCam4;
  TTntImage *srcSideFaceImageCam6;
  TTntImage *srcSideFaceImageCam7;
  TTntImage *srcSideFaceImageCam8;
  TTntImage *srcSideFaceImageCam10;
  TTntImage *srcSideFaceImageCam11;
  TTntImage *srcSideFaceImageCam12;
  TTntImage *srcSideFaceImageCam14;
  TTntImage *srcSideFaceImageCam15;
  TTntImage *srcSideFaceImageCam16;
  TTntImage *SideThresholdImage;
  TTntImage *dstSideFaceImageCam2;
  TTntImage *dstSideFaceImageCam3;
  TTntImage *dstSideFaceImageCam4;
  TTntImage *dstSideFaceImageCam8;
  TTntImage *dstSideFaceImageCam7;
  TTntImage *dstSideFaceImageCam6;
  TTntImage *dstSideFaceImageCam10;
  TTntImage *dstSideFaceImageCam11;
  TTntImage *dstSideFaceImageCam12;
  TTntImage *dstSideFaceImageCam16;
  TTntImage *dstSideFaceImageCam15;
  TTntImage *dstSideFaceImageCam14;
  TTntButton *SetThresholdCloseBtn;
  TStaticText *CameraLabel2;
  TStaticText *CameraLabel3;
  TStaticText *CameraLabel4;
  TStaticText *CameraLabel6;
  TStaticText *CameraLabel7;
  TStaticText *CameraLabel8;
  TStaticText *CameraLabel10;
  TStaticText *CameraLabel11;
  TStaticText *CameraLabel12;
  TStaticText *CameraLabel14;
  TStaticText *CameraLabel15;
  TStaticText *CameraLabel16;
  TStaticText *StaticText26;
  TStaticText *SideFaceThresholdValueLabel;
  TPanel *Panel26;
  TTntImage *ColorRateRangeImage;
  TTntImage *TabletColorRatioImage;
  TCheckBox *ColorRateCheckBox;
  TStaticText *StaticText14;
  TStaticText *ColorRatioRangeLabel;
  TTrackBar *SideThresholdForEachCamera2;
  TTrackBar *SideThresholdForEachCamera4;
  TTrackBar *SideThresholdForEachCamera3;
  TTrackBar *SideThresholdForEachCamera6;
  TTrackBar *SideThresholdForEachCamera8;
  TTrackBar *SideThresholdForEachCamera7;
  TTrackBar *SideThresholdForEachCamera10;
  TTrackBar *SideThresholdForEachCamera12;
  TTrackBar *SideThresholdForEachCamera11;
  TTrackBar *SideThresholdForEachCamera14;
  TTrackBar *SideThresholdForEachCamera16;
  TTrackBar *SideThresholdForEachCamera15;
  TTntImage *ColorRateRangeImage_Rear;
  TTntImage *TabletColorRatioImage_Rear;
  TStaticText *ColorRatioRangeLabel_Rear;
  TTntLabel *TntLabel1;
  TTntLabel *TntLabel2;
  TTntLabel *TntLabel3;
  TTntBitBtn *BitBtn27;
  TTntBitBtn *BitBtn29;
  TTntBitBtn *BitBtn30;
  TTntBitBtn *OtherPrintSettingButton;
  TTntBitBtn *BitBtn31;
	TTntPanel *SaveAndExitButton;
	TTntCheckBox *SideThrEachCheckBox;
	TTntEdit *SideThrEachEdit2;
	TTntEdit *SideThrEachEdit4;
	TTntEdit *SideThrEachEdit3;
	TTntEdit *SideThrEachEdit6;
	TTntEdit *SideThrEachEdit8;
	TTntEdit *SideThrEachEdit7;
	TTntEdit *SideThrEachEdit10;
	TTntEdit *SideThrEachEdit12;
	TTntEdit *SideThrEachEdit11;
	TTntEdit *SideThrEachEdit14;
	TTntEdit *SideThrEachEdit16;
	TTntEdit *SideThrEachEdit15;
	TTntLabel *colorRateRangeLabel2;
	TTntLabel *colorRateRangeLabel6;
	TTntLabel *colorRateRangeLabel10;
	TTntLabel *colorRateRangeLabel14;
	TTrackBar *colorRateRangeTrackBar2;
	TTrackBar *colorRateRangeTrackBar4;
	TTrackBar *colorRateRangeTrackBar3;
	TTrackBar *colorRateRangeTrackBar6;
	TTrackBar *colorRateRangeTrackBar8;
	TTrackBar *colorRateRangeTrackBar7;
	TTrackBar *colorRateRangeTrackBar10;
	TTrackBar *colorRateRangeTrackBar12;
	TTrackBar *colorRateRangeTrackBar11;
	TTrackBar *colorRateRangeTrackBar14;
	TTrackBar *colorRateRangeTrackBar16;
	TTrackBar *colorRateRangeTrackBar15;
	TTntLabel *colorRateRangeLabel4;
	TTntLabel *colorRateRangeLabel8;
	TTntLabel *colorRateRangeLabel12;
	TTntLabel *colorRateRangeLabel16;
	TTntLabel *colorRateRangeLabel3;
	TTntLabel *colorRateRangeLabel7;
	TTntLabel *colorRateRangeLabel11;
	TTntLabel *colorRateRangeLabel15;

    void __fastcall ShapExtractButtonClick(TObject *Sender);
    void __fastcall DiscrimiationMarkExtractClick(TObject *Sender);
    void __fastcall CaptureImage1Click(TObject *Sender);
    void __fastcall CaptureImage2Click(TObject *Sender);
    void __fastcall CaptureImage3Click(TObject *Sender);
    void __fastcall CaptureImage4Click(TObject *Sender);
    void __fastcall CaptureImage5Click(TObject *Sender);
    void __fastcall CaptureImage6Click(TObject *Sender);
    void __fastcall CaptureImage7Click(TObject *Sender);
    void __fastcall CaptureImage8Click(TObject *Sender);
    void __fastcall CaptureImage9Click(TObject *Sender);
    void __fastcall CaptureImage10Click(TObject *Sender);
    void __fastcall CaptureImage11Click(TObject *Sender);
    void __fastcall CaptureImage12Click(TObject *Sender);
    void __fastcall CaptureImage13Click(TObject *Sender);
    void __fastcall CaptureImage14Click(TObject *Sender);
    void __fastcall CaptureImage15Click(TObject *Sender);
    void __fastcall CaptureImage16Click(TObject *Sender);
    void __fastcall CaptureImage17Click(TObject *Sender);
    void __fastcall CaptureImage18Click(TObject *Sender);
    void __fastcall CaptureImage19Click(TObject *Sender);
    void __fastcall CaptureImage20Click(TObject *Sender);
    void __fastcall CaptureImage21Click(TObject *Sender);
    void __fastcall CaptureImage22Click(TObject *Sender);
    void __fastcall CaptureImage23Click(TObject *Sender);
    void __fastcall CaptureImage24Click(TObject *Sender);
    void __fastcall CaptureImage25Click(TObject *Sender);
    void __fastcall CaptureImage26Click(TObject *Sender);
    void __fastcall CaptureImage27Click(TObject *Sender);
    void __fastcall CaptureImage28Click(TObject *Sender);
    void __fastcall CaptureImage29Click(TObject *Sender);
    void __fastcall CaptureImage30Click(TObject *Sender);
    void __fastcall BitBtn1Click(TObject *Sender);
    void __fastcall BitBtn2Click(TObject *Sender);
    void __fastcall PrintExtractWorkEndButtonClick(TObject *Sender);
    void __fastcall FormDestroy(TObject *Sender);
    void __fastcall Image5MouseDown(TObject *Sender, TMouseButton Button,
          TShiftState Shift, int X, int Y);
    void __fastcall Image5MouseMove(TObject *Sender, TShiftState Shift,
          int X, int Y);
    void __fastcall Image5MouseUp(TObject *Sender, TMouseButton Button,
          TShiftState Shift, int X, int Y);
    void __fastcall BitBtn3Click(TObject *Sender);
    void __fastcall PrintMaskingButtonClick(TObject *Sender);
    void __fastcall UpDown1Click(TObject *Sender, TUDBtnType Button);
    void __fastcall BitBtn7Click(TObject *Sender);
    void __fastcall AuctoPrintExtractButtonClick(TObject *Sender);
    void __fastcall SaveAndExitButtonClick(TObject *Sender);
    void __fastcall ImageSelectButtonClick(TObject *Sender);
    void __fastcall PrintManualExtractButtonClick(TObject *Sender);
    void __fastcall UpDown2Click(TObject *Sender, TUDBtnType Button);
    void __fastcall ManualWorkEndButtonClick(TObject *Sender);
    void __fastcall ManualEraseButtonClick(TObject *Sender);
    void __fastcall ManualDrawButtonClick(TObject *Sender);
    void __fastcall Image9MouseDown(TObject *Sender, TMouseButton Button,
          TShiftState Shift, int X, int Y);
    void __fastcall Image9MouseMove(TObject *Sender, TShiftState Shift,
          int X, int Y);
    void __fastcall Image9MouseUp(TObject *Sender, TMouseButton Button,
          TShiftState Shift, int X, int Y);
    void __fastcall Image11Click(TObject *Sender);
    void __fastcall Image12Click(TObject *Sender);
    void __fastcall Image13Click(TObject *Sender);
    void __fastcall UpDown3Click(TObject *Sender, TUDBtnType Button);
    void __fastcall Image14MouseDown(TObject *Sender, TMouseButton Button,
          TShiftState Shift, int X, int Y);
    void __fastcall Image14MouseUp(TObject *Sender, TMouseButton Button,
          TShiftState Shift, int X, int Y);
    void __fastcall Image17MouseUp(TObject *Sender, TMouseButton Button,
          TShiftState Shift, int X, int Y);
    void __fastcall Image17MouseDown(TObject *Sender, TMouseButton Button,
          TShiftState Shift, int X, int Y);
    void __fastcall Image14MouseMove(TObject *Sender, TShiftState Shift,
          int X, int Y);
    void __fastcall Image17MouseMove(TObject *Sender, TShiftState Shift,
          int X, int Y);
    void __fastcall BitBtn4Click(TObject *Sender);
    void __fastcall Image20MouseDown(TObject *Sender, TMouseButton Button,
          TShiftState Shift, int X, int Y);
    void __fastcall Image20MouseMove(TObject *Sender, TShiftState Shift,
          int X, int Y);
    void __fastcall Image20MouseUp(TObject *Sender, TMouseButton Button,
          TShiftState Shift, int X, int Y);
    void __fastcall BitBtn8Click(TObject *Sender);
    void __fastcall BitBtn9Click(TObject *Sender);
    void __fastcall SpeedButton1Click(TObject *Sender);
    void __fastcall SpeedButton2Click(TObject *Sender);
    void __fastcall BitBtn17Click(TObject *Sender);
    void __fastcall BitBtn11Click(TObject *Sender);
    void __fastcall BitBtn18Click(TObject *Sender);
    void __fastcall BitBtn12Click(TObject *Sender);
    void __fastcall BitBtn19Click(TObject *Sender);
    void __fastcall BitBtn13Click(TObject *Sender);
    void __fastcall BitBtn14Click(TObject *Sender);
    void __fastcall ETC_InformationExtractButtonClick(TObject *Sender);
    void __fastcall Image3MouseDown(TObject *Sender, TMouseButton Button,
          TShiftState Shift, int X, int Y);
    void __fastcall Image3MouseUp(TObject *Sender, TMouseButton Button,
          TShiftState Shift, int X, int Y);
    void __fastcall Image3MouseMove(TObject *Sender, TShiftState Shift,
          int X, int Y);
    void __fastcall BitBtn20Click(TObject *Sender);
    void __fastcall BitBtn21Click(TObject *Sender);
    void __fastcall SpeedButton3Click(TObject *Sender);
    void __fastcall SpeedButton4Click(TObject *Sender);
    void __fastcall SpeedButton5Click(TObject *Sender);
    void __fastcall PrintEditSizeOptionUpdownBtnClick(TObject *Sender, TUDBtnType Button);
    void __fastcall Image8MouseMove(TObject *Sender, TShiftState Shift,
          int X, int Y);
    void __fastcall Image8MouseDown(TObject *Sender, TMouseButton Button,
          TShiftState Shift, int X, int Y);
    void __fastcall Image8MouseUp(TObject *Sender, TMouseButton Button,
          TShiftState Shift, int X, int Y);
    void __fastcall BitBtn10Click(TObject *Sender);
    void __fastcall ThreeDDiscriminationExtractButtonClick(TObject *Sender);
    void __fastcall BitBtn24Click(TObject *Sender);
    void __fastcall BitBtn16Click(TObject *Sender);
    void __fastcall SpeedButton6Click(TObject *Sender);
    void __fastcall SpeedButton7Click(TObject *Sender);
    void __fastcall Image32Click(TObject *Sender);
    void __fastcall Image33Click(TObject *Sender);
    void __fastcall Image34Click(TObject *Sender);
    void __fastcall Image35Click(TObject *Sender);
    void __fastcall Image36Click(TObject *Sender);
    void __fastcall Image37Click(TObject *Sender);
    void __fastcall Image38Click(TObject *Sender);
    void __fastcall Image39Click(TObject *Sender);
    void __fastcall Image40Click(TObject *Sender);
    void __fastcall Image41Click(TObject *Sender);
    void __fastcall Image42Click(TObject *Sender);
    void __fastcall Image43Click(TObject *Sender);
    void __fastcall Image44Click(TObject *Sender);
    void __fastcall Image45Click(TObject *Sender);
    void __fastcall Image46Click(TObject *Sender);
    void __fastcall Image47Click(TObject *Sender);
    void __fastcall Image48Click(TObject *Sender);
    void __fastcall Image49Click(TObject *Sender);
    void __fastcall Image50Click(TObject *Sender);
    void __fastcall Image51Click(TObject *Sender);
    void __fastcall Image52Click(TObject *Sender);
    void __fastcall Image53Click(TObject *Sender);
    void __fastcall Image54Click(TObject *Sender);
    void __fastcall Image55Click(TObject *Sender);
    void __fastcall Image56Click(TObject *Sender);
    void __fastcall Image57Click(TObject *Sender);
    void __fastcall Image58Click(TObject *Sender);
    void __fastcall Image59Click(TObject *Sender);
    void __fastcall Image60Click(TObject *Sender);
    void __fastcall Image61Click(TObject *Sender);
    void __fastcall BitBtn6Click(TObject *Sender);
    void __fastcall BitBtn15Click(TObject *Sender);
    void __fastcall BitBtn22Click(TObject *Sender);
    void __fastcall BitBtn23Click(TObject *Sender);
    void __fastcall BitBtn25Click(TObject *Sender);
    void __fastcall BitBtn27Click(TObject *Sender);
    void __fastcall BitBtn29Click(TObject *Sender);
    void __fastcall Image68Click(TObject *Sender);
    void __fastcall Image69Click(TObject *Sender);
    void __fastcall Image63MouseUp(TObject *Sender, TMouseButton Button,
          TShiftState Shift, int X, int Y);
    void __fastcall BitBtn26Click(TObject *Sender);
    void __fastcall BitBtn28Click(TObject *Sender);
    void __fastcall SpeedButton8Click(TObject *Sender);
    void __fastcall SpeedButton9Click(TObject *Sender);
    void __fastcall Image64Click(TObject *Sender);
    void __fastcall Image65Click(TObject *Sender);
    void __fastcall Image66Click(TObject *Sender);
    void __fastcall UpDown6Click(TObject *Sender, TUDBtnType Button);
    void __fastcall Image62MouseDown(TObject *Sender, TMouseButton Button,
          TShiftState Shift, int X, int Y);
    void __fastcall Image62MouseMove(TObject *Sender, TShiftState Shift,
          int X, int Y);
    void __fastcall Image62MouseUp(TObject *Sender, TMouseButton Button,
          TShiftState Shift, int X, int Y);
    void __fastcall GroupBox24Click(TObject *Sender);
    void __fastcall ScrollBar4Change(TObject *Sender);
    void __fastcall ScrollBar3Change(TObject *Sender);
    void __fastcall ScrollBar1Change(TObject *Sender);
    void __fastcall ScrollBar2Change(TObject *Sender);
    void __fastcall RadioButton5Click(TObject *Sender);
    void __fastcall RadioButton6Click(TObject *Sender);
    void __fastcall BitBtn30Click(TObject *Sender);
    void __fastcall UpDown7Click(TObject *Sender, TUDBtnType Button);
    void __fastcall BitBtn33Click(TObject *Sender);
    void __fastcall BitBtn32Click(TObject *Sender);
    void __fastcall Image71MouseDown(TObject *Sender, TMouseButton Button,
          TShiftState Shift, int X, int Y);
    void __fastcall Image71MouseUp(TObject *Sender, TMouseButton Button,
          TShiftState Shift, int X, int Y);
    void __fastcall Image71MouseMove(TObject *Sender, TShiftState Shift,
          int X, int Y);
    void __fastcall BitBtn31Click(TObject *Sender);
  void __fastcall ThresholdUpDownClick(TObject *Sender, TUDBtnType Button);
  void __fastcall shapeSelectionCancelBtnClick(TObject *Sender);
  void __fastcall shapeSelectionOKBtnClick(TObject *Sender);
  void __fastcall shapeSelectImage1Click(TObject *Sender);
  void __fastcall ZoomInImageClick(TObject *Sender);
  void __fastcall ZoomOutImageClick(TObject *Sender);
  void __fastcall zoomInOutImageMouseDown(TObject *Sender,
          TMouseButton Button, TShiftState Shift, int X, int Y);
  void __fastcall zoomInOutImageMouseUp(TObject *Sender,
          TMouseButton Button, TShiftState Shift, int X, int Y);
  void __fastcall zoomInOutImageMouseMove(TObject *Sender,
          TShiftState Shift, int X, int Y);
  void __fastcall zoomIn3DImageClick(TObject *Sender);
  void __fastcall zoomOut3DImageClick(TObject *Sender);
  void __fastcall zoomInOutNavigate3DImageMouseDown(TObject *Sender,
          TMouseButton Button, TShiftState Shift, int X, int Y);
  void __fastcall zoomInOutNavigate3DImageMouseMove(TObject *Sender,
          TShiftState Shift, int X, int Y);
  void __fastcall zoomInOutNavigate3DImageMouseUp(TObject *Sender,
          TMouseButton Button, TShiftState Shift, int X, int Y);
  void __fastcall SetThresholdBtnClick(TObject *Sender);
  void __fastcall SetThresholdCloseBtnClick(TObject *Sender);
  void __fastcall SideThresholdImageMouseDown(TObject *Sender,
          TMouseButton Button, TShiftState Shift, int X, int Y);
  void __fastcall ExtractSplitLineBtnClick(TObject *Sender);
  void __fastcall SplitLineImageSelectionBtnClick(TObject *Sender);
  void __fastcall SplitLineExtractionBtnClick(TObject *Sender);
  void __fastcall SimilarPrintSettingBtnClick(TObject *Sender);
  void __fastcall PrintSimliarCheckCloseBtnClick(TObject *Sender);
  void __fastcall CheckPrintSimliarResultBtnClick(TObject *Sender);
  void __fastcall SimilarPrintSettingSizeEditKeyPress(TObject *Sender,
          char &Key);
  void __fastcall PrintABSimilarCheckResultImageMouseDown(TObject *Sender,
          TMouseButton Button, TShiftState Shift, int X, int Y);
  void __fastcall PrintABSimilarCheckResultImageMouseUp(TObject *Sender,
          TMouseButton Button, TShiftState Shift, int X, int Y);
  void __fastcall PrintABSimilarCheckResultImageMouseMove(TObject *Sender,
          TShiftState Shift, int X, int Y);
  void __fastcall InitSimilarPrintMaskBtnClick(TObject *Sender);
  void __fastcall SimilarPrintSettingSizeEditClick(TObject *Sender);
  void __fastcall SimilarPrintSettingSizeEditKeyDown(TObject *Sender,
          WORD &Key, TShiftState Shift);
  void __fastcall ApplyDiffPrintAreaBtnClick(TObject *Sender);
  void __fastcall SetupdataStatusTimerTimer(TObject *Sender);
  void __fastcall GetThreeDInfoButtonClick(TObject *Sender);
  void __fastcall Extraction3DInfoGroupBoxDblClick(TObject *Sender);
  void __fastcall ExtractThreeInfoCloseBtnClick(TObject *Sender);
  void __fastcall SpeedButton10Click(TObject *Sender);
  void __fastcall PrintLabelEditOptionBtn1Click(TObject *Sender);
  void __fastcall PrintLabelEditOptionBtn2Click(TObject *Sender);
  void __fastcall TntBitBtn1Click(TObject *Sender);
  void __fastcall TntBitBtn2Click(TObject *Sender);
  void __fastcall ReadHistoryButtonClick(TObject *Sender);
  void __fastcall HistoryCloseButtonClick(TObject *Sender);
  void __fastcall HistoryGridClick(TObject *Sender);
  void __fastcall ApplySetupDataButtonClick(TObject *Sender);
  void __fastcall SideThresholdForEachCamera8Change(TObject *Sender);
  void __fastcall ColorRateCheckBoxClick(TObject *Sender);
  void __fastcall ColorRateRangeImageMouseDown(TObject *Sender,
          TMouseButton Button, TShiftState Shift, int X, int Y);
  void __fastcall TntFormActivate(TObject *Sender);
  void __fastcall ColorRateRangeImage_RearMouseDown(TObject *Sender,
          TMouseButton Button, TShiftState Shift, int X, int Y);
  void __fastcall OtherPrintSettingButtonClick(TObject *Sender);
	void __fastcall SideThrEachCheckBoxClick(TObject *Sender);
	void __fastcall SideThrEachEdit2Click(TObject *Sender);
	void __fastcall colorRateRangeTrackBar2Change(TObject *Sender);
private:	// User declarations
  bool __fastcall makeOffsetData();
typedef struct
{
    int AdjustCenterXInImage;
    int AdjustCenterYInImage;
    int TabletSideShapeShiftX;
    int TabletSideShapeShiftY;
    int TabletSideShapeXTotion;
    int TabletSideShapeYTotion;
    int TabletFrontShapeXTotion;
    int TabletFrontShapeYTotion;
    int TabletRotationAngle;
    int SearchStartXForSideShape;
    int TopEdgeLineShiftY;
    int SideShapeStartX;
    int SideShapeEndX;
    int PrintCenterX;
    int PrintCenterY;
    int TalbletTopFaceRotation;
    int StXForSideShapeImage;
    int EndXForSideShapeImage;

}TTabletMatchingResult;

    int print1ExtractUnusalSW;
    int print2ExtractUnusalSW;

    int Disk1Print1ExtractUnusalSW;
    int Disk1Print2ExtractUnusalSW;
    int Disk2Print1ExtractUnusalSW;
    int Disk2Print2ExtractUnusalSW;

    int ImageWidth;
    int ImageHeight;
    int SelectedImageN[2] ;
    int SelectedWorkSW[2];
    int SelectedShapeImg;
    int SelectedFace;
    int PrintMaskSW;
    int ManualCorrectSW;
    int SliceMaskSW;
    int OtherPrintSettingSW;
    int SelectedDisplayColor;
    int noneSelectedDisplayColor1;
    int noneSelectedDisplayColor2;
    int ImageDownSW;
    int DrawMaskWidth;
    int MaskWidth;
    int ManualWorkAreaWidth;
    int ManualWorkKind;
    int TabletshiftX;
    int TabletshiftY;
    int ImageSelectActiveSW;
    int ModifyThickWidth;

    int centerXInImage;
    int centerYInImage;

    int AdjustCenterXInImage;
    int AdjustCenterYInImage;
    float RotationAngleInSelectedImage;

    int VersionTransSW;
    int AdjustWorkingKind1;
    int AdjustWorkingKind2;

    int ThreeDPrintThreshold;
    int SelectDisk;

    int MeanNormalVecter[3];
    unsigned int SqrtData[90000];
    short ArcSinData[10001];             //20k

    Graphics::TBitmap *SelectedImage;
    Graphics::TBitmap *SelectedImage1;
    Graphics::TBitmap *SelectedImage2;

    Graphics::TBitmap *ThreeDSelectedImage1;
    Graphics::TBitmap *ThreeDSelectedImage2;

    unsigned char PrintMaskArea[640*480];
    unsigned char PrintBinarizationData[640*480];
    unsigned char tempPrintBinarizationData[640*480];
    unsigned char PrintBinarizationDataForThickModify[640*480];
    unsigned char Print1BinarizationDataForSlicePrint[640*480];
    unsigned char Print2BinarizationDataForSlicePrint[640*480];
    unsigned char ShapeBinaryImageForPrintExtract[640*480];
    unsigned char Temp_ShapeBinaryImage[640*480];
    unsigned char ShapeBinaryImage[640*480];
    unsigned char TempThreeD_Image[640*480];
    short xyTransData[620*2*40];
    short zTransData[512*2*30];

    int ShapeEdgeNeighborRange;

    int ProtoTabletCenterX;
    int ProtoTabletCenterY;
    int ProtoTabletCenterZ;

    int tabletETCShape_UpSideDownSW;
    int ETC_FrontShapeEdgePoint[4000][2];
    int ETC_FrontShapeEdgeCount;
    unsigned char ColorSrcImg[640*480*3];

    TTabletMatchingResult TabletMatchingResult;
    TTabletSetupData tempSourceData;
    TTablet3DSetupData Tablet3DSetupData;

    int CaptureImageMoveSW;
    int MouseIntiatePosiX;
    int Groupbox16StopPosition;
    int Groupbox22StopPosition;
    int ThreeDPrintBinariztionResultViewSW;
    int ImageOption;
    int PrintAreaCnt;
    int tempUDPOS;

    int Cos_RotationAngle, Sin_RotationAngle;
    
    int zoomInOutShiftX;
    int zoomInOutShiftY;
    int zoomInOutSize;
    int zoomImageNavigateFlag;
    int navigateStdX;
    int navigateStdY;
    int zoomROIX1, zoomROIY1, zoomROIX2, zoomROIY2;
    int tempStdX, tempStdY;

    int zoomInOutShiftX3D;
    int zoomInOutShiftY3D;
    int zoomInOutSize3D;
    int zoomImageNavigateFlag3D;
    int navigateStdX3D;
    int navigateStdY3D;
    int zoomROIX1For3D, zoomROIY1For3D, zoomROIX2For3D, zoomROIY2For3D;
    int tempStdXFor3D, tempStdYFor3D;
    int threeDPrintExtractMode;

    bool bThreeDDataExtraction;

    int frontFace2DInfoMode;

    int maxMatchingValue;
    int matchingAngle;
    int matchingShiftX;
    int matchingShiftY;

    int Disk1MinHeightDiff;
    int Disk2MinHeightDiff;
    int Disk1BestNotiltImageIndex;
    int Disk2BestNotiltImageIndex;
    int Disk1OutlineAverageHeight;
    int Disk2OutlineAverageHeight;
    int Disk1OutlineMinThreshold;
    int Disk2OutlineMinThreshold;

    int PrintLabelEditMode;
    int SelectedPrintLabelN;

    int TabletShapeSize;

    WideString GlobalSetupDataID;

    unsigned char OffsetArea[SYSTEM_TOTAL_CAMERA_COUNT][(IMAGE_3D_WIDTH / 2) * (IMAGE_3D_HEIGHT / 2)];
    unsigned char BackgroundColorImage[640 * 480 * 3];
    unsigned char extensionColorSourceImage[MAX_ZOOM_W_PIXEL * MAX_ZOOM_H_PIXEL * 3];
    unsigned char extensionThreeDImage[MAX_ZOOM_W_PIXEL_FOR3D * MAX_ZOOM_W_PIXEL_FOR3D * 3];
    unsigned char originalColorSourceImage[640 * 480 * 3];
    unsigned char tempRotationThreeDImage[IMAGE_3D_WIDTH * IMAGE_3D_HEIGHT*3];
    unsigned char PrintBinarizationDataForThreeD[IMAGE_3D_WIDTH*IMAGE_3D_HEIGHT];
    unsigned char PrintBinarizationDataForThreeDSlicePrint[IMAGE_3D_WIDTH*IMAGE_3D_HEIGHT];
    unsigned char OhterFacePrintBinaryData[IMAGE_3D_WIDTH*IMAGE_3D_HEIGHT];

    unsigned char HalfTempImage[IMAGE_3D_WIDTH*IMAGE_3D_HEIGHT/2];
    unsigned char HalfShapeData[IMAGE_3D_WIDTH*IMAGE_3D_HEIGHT/2];
    unsigned char HalfShapeBinaryImage[IMAGE_3D_WIDTH*IMAGE_3D_HEIGHT/2];
    unsigned char HalfShrinkShapeBinaryImage[IMAGE_3D_WIDTH*IMAGE_3D_HEIGHT/2];
    unsigned char HalfExtendShapeBinaryImage[IMAGE_3D_WIDTH*IMAGE_3D_HEIGHT/2];
    short HalfLabelImage[IMAGE_3D_WIDTH*IMAGE_3D_HEIGHT/2];
    unsigned char HalfGradientImage[IMAGE_3D_WIDTH*IMAGE_3D_HEIGHT/4];
    unsigned char GradientImage[IMAGE_3D_WIDTH*IMAGE_3D_HEIGHT];
    short ColorRateImageArr[IMAGE_3D_WIDTH * IMAGE_3D_HEIGHT * 3];
    unsigned char SimilarPrintMaskImage[IMAGE_3D_WIDTH * IMAGE_3D_HEIGHT];
    unsigned char ExpectedThreeDPrintArea[IMAGE_3D_WIDTH * IMAGE_3D_HEIGHT];

    unsigned char Disk1StdThreeDImage[MAX_IMAGE_WIDTH * MAX_IMAGE_HEIGHT];
    unsigned char Disk2StdThreeDImage[MAX_IMAGE_WIDTH * MAX_IMAGE_HEIGHT];
    unsigned char Disk1NrmThreeDImage[MAX_IMAGE_WIDTH * MAX_IMAGE_HEIGHT];
    unsigned char Disk2NrmThreeDImage[MAX_IMAGE_WIDTH * MAX_IMAGE_HEIGHT];

    unsigned char PrintEditResult[MAX_IMAGE_WIDTH * MAX_IMAGE_HEIGHT];
    int PrintEditSW;

    int Disk1HeightInfo[100];  // imagecount;
    int Disk2HeightInfo[100];  // imagecount;

    bool bInit;

    void __fastcall ShapeExtract(unsigned char *colorSourceImage, unsigned char *accumulateShapeImage, int rgb, int protoThreshold, int startX, int endX, int startY, int endY, int *meanColor, int cameraIndex);
    float __fastcall Calculation_ShapeRotationAngle(unsigned char *expansionTempData,int tabletCenterX, int tabletCenterY, int startX, int endX, int startY, int endY, int option);

    void __fastcall ShapeMatching( int a, int b);
    int __fastcall Optimal_Threshold(int *histo, int st_gray, int end_gray, int *grayMean);
    void __fastcall IP_Thinning(byte *DstBitmap, byte *SrcBitmap, int Width, int Height);
    void __fastcall DiscrimiationMarkExtractF( int a, int b);
    void __fastcall ImageSelectDisplay(int imageWindowN);

    int  __fastcall PrintLabeling(unsigned char *src, short *label_Image, int *Pixel_N_Of_Label);
    int  __fastcall PrintLabelingForThreeDImage(unsigned char *src, short *label_Image, int *Pixel_N_Of_Label);

    void __fastcall FindSensitiveStickingAreaForThreeDImage(short *label_Image , int labelN, int option, int option2);
    void __fastcall FindSensitiveStickingArea(short *label_Image , int labelN, int option, int option2);
    void __fastcall ReadDataForTabletCharacterExtract(void);
    int __fastcall LabellingForTabletImage(short *label_Image, unsigned char *smallSizeBinaryImage, int startX, int endX, int startY, int endY, int imageWidth, int imageHeight);
    int __fastcall ReadSetupData(TTabletSetupData *tabletSetupData);

    void __fastcall PrintThickModify(void);
    bool __fastcall PrintInformationCalculation(int mode);
    void __fastcall Modify_ETC_PrintInformation_Save(void);
    int __fastcall LabellingForTabletThreeDImage(short *label_Image, unsigned char *smallSizeBinaryImage, int startX, int endX, int startY, int endY) ;
    
    void __fastcall ThreeDImageSelectDisplay(int imageWindowN);
    void __fastcall DisplayGradation(int threshold);

    void __fastcall ExtractDentedArea(unsigned char *src, unsigned char *result);

    void __fastcall ThreeDPrintDataBinarization(void);
    void __fastcall DisplayPrintBinarizationManualAdjustResult(int shiftValue,int  multipleValue);
    void __fastcall PrintBinaryDataDisplay(void);
    bool __fastcall PrintInformationCalculationForThreeD(void);
    bool __fastcall OtherFacePrintInformationCalculationForThreeD(void);
    int  __fastcall Read3DSetupData(TTablet3DSetupData *tablet3DSetupData);

    void __fastcall GetDefaultString();
    void __fastcall ExtractPrintColor();
    void __fastcall CalculateCutoffPrintThreshold(int Threshold);
    void __fastcall UpdatePrintArea();
    void __fastcall ETC_Asymmetry_ShapeExtract(int rgb, int protoThreshold, int startX, int endX, int startY, int endY);
    void __fastcall LoadZoomInOutNavigationImage();
    void __fastcall refreshZoomInTabletImage(unsigned char *tempPrintMaskArea, int initSW);
    void __fastcall LoadZoomInOutNavigation3DImage();
    void __fastcall refreshZoomInTablet3DImage(unsigned char *tempImage, int mode);
    void __fastcall setExtractedThreeDEngraveData();
    bool __fastcall checkPrintExtractResult();
    void __fastcall SideFaceThresholdValueDisplay(void);
    void __fastcall LoadSideFaceImage(void);
    void __fastcall FilteringSideFaceImage();
    void __fastcall SetBlankImage(TTntImage *dstImage);
    bool __fastcall SplitLineInformationCalculation(void);
    void __fastcall DisplayExistData(TTntImage *Destination, int dataCount, short arr[][2]);
    void __fastcall LoadExtractedPrintData();
    void __fastcall LoadPrintSimilarCheckResult();
    void __fastcall EditSimilarPrint(int x, int y);
    void __fastcall RefreshPrintABMatchingResultImage(int tempX, int tempY);
    void __fastcall ApplySimilarPrintMaskInfo();
    void __fastcall ExtractThreeInformation();
    void __fastcall AnalysisThreeDTiltLevel(Graphics::TBitmap *img, int cameraIndex, int ImageIndex, int searchingSW);
    void __fastcall threeDRotation(unsigned char *srcImage, int centerX, int centerY, int centerZ, int xzR, int yzR, int cameraIndex);
    void __fastcall GetThreeDThreshold(unsigned char *srcImage, int yzR, int cameraIndex);
    void __fastcall NormalizedThreeDImage(unsigned char *srcImage, int normalizedValue, int *centerX, int *centerY, int *centerZ, int cameraIndex);
    void __fastcall CheckOverlapArea(int *prevOverlapResultCount, int *studyNormalizedValue, int currentNormalizedValue);
    bool __fastcall LoadPrintGroupInformation(void);
    void __fastcall RearrangePrintLabel(int targetLabelN);
    void __fastcall ApplyPrintLabel();
    void __fastcall LoadExtractedPrintLabelData();
    void __fastcall ReadSetupHistory();
    unsigned int __fastcall MakeCheckSumID(unsigned int* src, unsigned int len);

public:		// User declarations
    __fastcall TTabletCharacterExtractForm(TComponent* Owner);
    int SetupMode;
    bool SetupDataChanged;
};
//---------------------------------------------------------------------------
extern PACKAGE TTabletCharacterExtractForm *TabletCharacterExtractForm;
//---------------------------------------------------------------------------
#endif
