#pragma once
|
|
enum CellSide {CS_RIGHT, CS_TOP, CS_BOTTOM/*, CS_LEFT*/};
|
|
struct reflowParam
|
{
|
BYTE *pImageBuffer;
|
int nImageWidth;
|
int nImageHeight;
|
int nChannel;
|
CRect *ROI_Rect;
|
int nSide;
|
int nBaseTh;
|
int nDamTh2;
|
int nDamTh1;
|
int nBaseline;
|
int nBaseDam2;
|
int nDam2Dist;
|
int nDam12Dist;
|
int nDam1Dist;
|
};
|
|
//pImageBuffer : Input Image. ÀԷ¹ÞÀº Image Buffer¹× ChannelÀ» Ȱ¿ëÇÏ¿© GrayScale·Î º¯È¯ ÈÄ »ç¿ë
|
//imageWidth, imageHeight : Image Å©±â.
|
//ROI_Rect : °Ë»ç ¿µ¿ª ¼³Á¤
|
//nChannel : Input ImageÀÇ Color Channel ¼ö. 1~4
|
//nSide : CS_RIGHT(vertical 0->dam2->dam1->pattern), CS_TOP(horizontal 0->dam2->dam1->pattern), CS_BOTTOM(horizontal 0->pattern->dam1->dam2)
|
//nBaseTh : threshold baseline
|
//nDamTh2 : threshold dam2
|
//nDamTh1 : threshold dam1
|
//nBaseline : Base Line distance
|
//nBaseDam2 : Base Line - dam2 distance
|
//nDam2Dist : dam2 distance
|
//nDam12Dist : dam2-dam1 distance
|
//nDam1Dist : dam1 distance
|
|
#define LOCAL_PEAK_PERIOD 10
|
|
BYTE LocalMinima(int *pProjection, int x, int width);
|
BYTE LocalMaxima(int *pProjection, int x, int width);
|
int LocalMinimaAddr(int *pProjection, int x, int width);
|
|
int AFX_EXT_API BOE_Linecheck(int* boe_line, reflowParam *rParam);
|
////image¿Í parameter(roi, side, threshold, distance)¸¦ ÀÔ·Â¹Þ¾Æ boe_line[6] ¹è¿ ¹× return(line °³¼ö) Ãâ·Â
|
|
////OUTPUT
|
//return °ª : °ËÃâÇÑ LineÀÇ °³¼ö. 3 ¹Ì¸¸ : DAM2 Reflow ÆÇÁ¤, 4~5 : DAM1 Reflow ÆÇÁ¤, 6 : no Reflow ÆÇÁ¤ / -1 : image not loaded, -2 : roi setting error, -3 : roi length error, -5 : select wrong side
|
//boe_line : Line ÁÂÇ¥ Ãâ·Â ¹è¿. DAM#2 ¹Ù±ù 2 Lines, DAM#2, DAM#1 ¼øÀ¸·Î ÁÂÇ¥°¡ ÀúÀåµÊ(Áï, PatternÀ» ±âÁØÀ¸·Î ¹Ù±ùÂʺÎÅÍ ÀúÀå)
|
|
////INPUT
|
//reflowParam : °Ë»ç Parameter
|
|
CString AFX_EXT_API Reflow_Judge(int LineCheck);
|
////BOE_LineCheck MethodÀÇ Return °ªÀ» Åä´ë·Î ÆÇÁ¤À» StringÀ¸·Î Ãâ·Â
|
//LineCheck : °ËÃâÇÑ LineÀÇ °³¼ö, BOE_Linecheck ¸Þ¼ÒµåÀÇ Return °ª
|
//return °ª : 3 ¹Ì¸¸ : "DAM2 Reflow", "DAM1 Reflow", 6 : "no Reflow" / -1 : "image not loaded", -2 : "roi setting error", -3 : "roi length error", -5 : "select wrong side"
|
|
|
|
int BOE_Linecheck_Side0(int* boe_line, BYTE* pImage, int imageWidth, int imageHeight, CRect* ROI_Rect, int th, int th2, int th3, int dist0, int dist1, int dist2, int dist3, int dist4);
|
int BOE_Linecheck_Side1(int* boe_line, BYTE* pImage, int imageWidth, int imageHeight, CRect* ROI_Rect, int th, int th2, int th3, int dist0, int dist1, int dist2, int dist3, int dist4);
|
int BOE_Linecheck_Side2(int* boe_line, BYTE* pImage, int imageWidth, int imageHeight, CRect* ROI_Rect, int th, int th2, int th3, int dist0, int dist1, int dist2, int dist3, int dist4);
|