HGGitLab

Commit 17335054 authored by luoliangyi's avatar luoliangyi

HGImgProc使用opencv目录下面的zlib库,重新编译

parent d9dc8519
......@@ -40,12 +40,10 @@
</Compiler>
<Linker>
<Add option="-L../../../../third_party/opencv/uos/amd64/lib/" />
<Add option="-L../../../../third_party/zlib/uos/amd64/lib/" />
<Add option="-L../../../../release/bin/uos/amd64/" />
<Add option="-lopencv_highgui" />
<Add option="-lopencv_features2d" />
<Add option="-lopencv_imgproc" />
<Add option="-lopencv_flann" />
<Add option="-lopencv_core" />
<Add option="-littnotify" />
<Add option="-lz" />
......
......@@ -32,7 +32,10 @@
<Add option="-Wall" />
</Compiler>
<Linker>
<Add option="-L../../../../release/bin/uos/amd64/ -lHGBase -lHGImgFmt" />
<Add option="-L../../../../release/bin/uos/amd64/" />
<Add option="-lHGBase" />
<Add option="-lHGImgFmt" />
<Add option="-lHGImgProc" />
</Linker>
<Unit filename="main.cpp" />
<Extensions>
......
#include "stdio.h"
#include "../../../../base/HGBase.h"
#include "../../../../imgfmt/HGImgFmt.h"
#include "../../../../imgproc/HGImgProc.h"
int main()
{
......@@ -18,6 +19,13 @@ int main()
HGImgFmt_SaveImage(img, 0, NULL, 0, "pdf2jpg.jpg");
HGBase_DestroyImage(img);
HGImgFmt_LoadImage("1.bmp", 0, NULL, HGBASE_IMGTYPE_RGB, HGBASE_IMGORIGIN_BOTTOM, &img);
HGImage imgCrop = NULL;
HGImgProc_ImageDeskew(img, HGFALSE, HGFALSE, HGFALSE, NULL, 800, 1200, HGBASE_IMGTYPE_BGRA, HGBASE_IMGORIGIN_TOP, &imgCrop);
HGImgFmt_SaveImage(imgCrop, 0, NULL, 0, "deskew.bmp");
HGBase_DestroyImage(imgCrop);
HGBase_DestroyImage(img);
HGBase_WriteInfo(HGBASE_INFOTYPE_DEBUG, "%d", 123456);
HGBase_WriteInfo(HGBASE_INFOTYPE_DESC, "%d", 12345);
return 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment