차이

문서의 선택한 두 판 사이의 차이를 보여줍니다.

차이 보기로 링크

다음 판
이전 판
ko:bs2_getnormalizedimagefaceex [2021/05/26 15:45]
kkshin 만듦
ko:bs2_getnormalizedimagefaceex [2023/07/04 17:01] (현재)
줄 5: 줄 5:
  
 ===== BS2_GetNormalizedImageFaceEx ===== ===== BS2_GetNormalizedImageFaceEx =====
-[+ 2.8] ''​FaceStation F2''​ WARP 되어지지 않은(가공되어지지 않은) 얼굴 이미지로,​ WARP 이미지를 만듭니다. \\+[+ 2.8] ''​FaceStation F2''​ ''​BioStation 3''​ WARP 되어지지 않은(가공되어지지 않은) 얼굴 이미지로,​ WARP 이미지를 만듭니다. \\
 서버는 WARP 이미지를 사용자 별로 보관하다가,​ \\ 서버는 WARP 이미지를 사용자 별로 보관하다가,​ \\
 서버매칭 요청 시 해당 사용자의 WARP 이미지를 장치에 내려주는 형태로 서버매칭의 구현이 가능합니다. \\ 서버매칭 요청 시 해당 사용자의 WARP 이미지를 장치에 내려주는 형태로 서버매칭의 구현이 가능합니다. \\
줄 26: 줄 26:
 성공적으로 수행될 경우 ''​BS_SDK_SUCCESS''​를 반환하고,​ 에러가 발생할 경우 상응하는 에러 코드를 반환합니다. ​ 성공적으로 수행될 경우 ''​BS_SDK_SUCCESS''​를 반환하고,​ 에러가 발생할 경우 상응하는 에러 코드를 반환합니다. ​
 \\  ​ \\  ​
 +==== 샘플코드 ====
 +C++
 +<code cpp>
 +sdkResult = BS2_GetNormalizedImageFaceEx(context_,​ id, unwarpedBuffer.get(),​ unwarpedSize,​ warpedBuffer.get(),​ &​warpedSize);​
 +if (BS_SDK_SUCCESS != sdkResult)
 +{
 + TRACE("​BS2_GetNormalizedImageFaceEx call failed: %d", sdkResult);
 + return sdkResult;
 +}
 +</​code>​
 +C#
 +<code cpp>
 +BS2ErrorCode result = (BS2ErrorCode)API.BS2_GetNormalizedImageFaceEx(sdkContext,​ deviceID, unwarpedImagePtr,​ unwarpedImageLen,​ warpedImagePtr,​ out warpedImageLen);​
 +if (BS2ErrorCode.BS_SDK_SUCCESS == result)
 +{
 +    byte[] warpedBuffer = new byte[warpedImageLen];​
 +    Array.Clear(warpedBuffer,​ 0, (int)warpedImageLen);​
 +    Marshal.Copy(warpedImagePtr,​ warpedBuffer,​ 0, (int)warpedImageLen);​
 +            ​
 +    Console.WriteLine("​Enter the path and name of warped image file"​);​
 +    Console.Write(">>​ ");
 +    string warpedPath = Console.ReadLine();​
 +    if (warpedPath.Length == 0)
 +    {
 +        Console.WriteLine("​The path and name can not be empty."​);​
 +        return;
 +    }
 +
 +    File.WriteAllBytes(warpedPath,​ warpedBuffer);​
 +}
 +else
 +{
 +    Console.WriteLine("​Got error({0}).",​ result);
 +}
 +
 +Marshal.FreeHGlobal(unwarpedImagePtr);​
 +Marshal.FreeHGlobal(warpedImagePtr);​
 +</​code>​