paddlepaddle / flycv Goto Github PK
View Code? Open in Web Editor NEWFlyCV is a high-performance library for processing computer visual tasks.
License: Apache License 2.0
FlyCV is a high-performance library for processing computer visual tasks.
License: Apache License 2.0
windows 目前只有支持vs 2015吗?
Please consider provide vcpkg build option: https://github.com/microsoft/vcpkg
我看了下1.2.0版本所有平台都有唯独预编译windows没有
有什么办法证明 flycv 在运行吗
现在 再用 fastdeploy
[INFO] fastdeploy/vision/common/processors/base.cc(154)::EnableFlyCV Will change to use image processing library ProcLib::FLYCV
测试环境:台式ubuntu20.04,opencv3.4.14,flycv1.0.0
效果:fcv和opencv各自注释掉对方,独立的运行没问题,但是一起执行,opencv读图失败,图像数据为空
测试参考代码:
#include
#include <opencv2/opencv.hpp>
#include <dirent.h>
#include "flycv.h"
#include "pthread.h"
void calc_param(float& ratio, float& dww, float& dhh, int org_width, int org_height, int new_width, int new_hieght,
bool is_auto, bool scale_fill, bool scale_up, int stride) {
float r = std::min(new_width * 1.0 / org_width, new_hieght * 1.0 / org_height);
if (!scale_up)
r = std::min(r, float(1.0));
// ratio_w_ = r;
// ratio_h_ = r;
ratio = r;
int new_unpad_w_ = int(org_width * r);
int new_unpad_h_ = int(org_height * r);
int dw = new_width - new_unpad_w_;
int dh = new_hieght - new_unpad_h_;
if (is_auto) {
dw = dw % stride;
dh = dh % stride;
} else if (scale_fill) {
dw = 0, dh = 0;
new_unpad_w_ = new_width;
new_unpad_h_ = new_hieght;
float ratio_w_ = new_width * 1.0 / org_width;
float ratio_h_ = new_hieght * 1.0 / org_height;
}
// dw_ = dw / 2.0;
// dh_ = dh / 2.0;
dww = dw / 2.0;
dhh = dh / 2.0;
}
int main(int argc, char** argv) {
// // fcv的处理
fcv::Mat src_fcv = fcv::imread("../100.jpg");
std::cout << src_fcv.width() << " " << src_fcv.height() << std::endl;
float ratio_fcv, dww_fcv, dhh_fcv;
calc_param(ratio_fcv, dww_fcv, dhh_fcv, src_fcv.width(), src_fcv.height(), 640, 640, false, false, true, 2);
fcv::Mat resize_im_fcv;
double r_fcv = ratio_fcv;
fcv::resize(src_fcv, resize_im_fcv, fcv::Size(), r_fcv, r_fcv);
fcv::Mat padding_img_fcv;
int top_fcv = int(round(dhh_fcv - 0.1));
int bottom_fcv = int(round(dhh_fcv + 0.1));
int left_fcv = int(round(dww_fcv - 0.1));
int right_fcv = int(round(dww_fcv + 0.1));
fcv::Scalar color_fcv(114, 114, 114);
fcv::copy_make_border(resize_im_fcv, padding_img_fcv, top_fcv, bottom_fcv, left_fcv, right_fcv, fcv::BorderType::BORDER_CONSTANT, color_fcv);
fcv::imwrite("padding_img_fcv.jpg", padding_img_fcv);
// //opencv的处理
cv::Mat src_cv = cv::imread("../200.jpg");
std::cout << src_cv.cols << " " << src_cv.rows << std::endl;
float ratio, dww, dhh;
calc_param(ratio, dww, dhh, src_cv.cols, src_cv.rows, 640, 640, false, false, true, 2);
cv::Mat resize_im_cv;
cv::resize(src_cv, resize_im_cv, cv::Size(), ratio, ratio);
cv::Mat padding_img_cv;
int top = int(round(dhh - 0.1));
int bottom = int(round(dhh + 0.1));
int left = int(round(dww - 0.1));
int right = int(round(dww + 0.1));
cv::Scalar color_cv(114, 114, 114);
cv::copyMakeBorder(resize_im_cv, padding_img_cv, top, bottom, left, right, cv::BORDER_CONSTANT, color_cv);
cv::imwrite("padding_img_cv.jpg", padding_img_cv);
return 0;
}
请教下为什么线程池仅设置线程个数为1或者2?难道不应该是cpu核数吗?
ThreadPool::ThreadPool() : _active_wait(10000) { _thread_num = get_cpu_num() > 1 ? 2 : 1; }
[ 19%] Completed 'zlib'
[ 19%] Built target zlib
[ 20%] Linking CXX static library libbenchmark.a
[ 20%] Built target benchmark
[ 21%] Linking CXX static library ../../../lib/libgtest.a
[ 21%] Built target gtest
make: *** [all] Error 2
[ 0%] Performing build step for 'libjpeg-turbo'
make[3]: *** No targets specified and no makefile found. Stop.
make[2]: *** [third_party/libjpeg-turbo/stamp/libjpeg-turbo-build] Error 2
make[1]: *** [CMakeFiles/libjpeg-turbo.dir/all] Error 2
make: *** [all] Error 2
出现了上面问题是要单独手动安装吗
int poly_lines(Mat& img,
const Point2l* v,
int count,
bool is_closed,
const void* color,
int thickness,
LineType line_type,
int shift);
函数中颜色是const void*类型,这个函数是不是还没有开发完呢?
高斯,均值滤波希望能添加一下。
平台架构:ARM64
版本:v1.1.0
预编译版和自行编译都试过了。
发现写JPEG图片的时候,体积非常大...比raw data还大?
JPEG filesize=16,812,032 bytes
raw data size=2048*1365*3=8,386,560 bytes
#include <flycv.h>
#include <fstream>
#include <iostream>
#include <opencv2/opencv.hpp>
#include <string>
int main(int argc, char **argv) {
if (argc < 2) {
fprintf(stderr, "Usage: %s <img-path>\n", argv[0]);
exit(1);
}
std::string image_path = argv[1];
cv::Mat cv_img = cv::imread(image_path);
int width = cv_img.cols;
int height = cv_img.rows;
int channels = cv_img.channels();
printf("image width=%d, height=%d, channels=%d\n", width, height, channels);
cv::imwrite("cv.jpg", cv_img);
fcv::Mat fcv_img(width, height, fcv::FCVImageType::PKG_BGR_U8);
memcpy(fcv_img.data(), cv_img.data, width * height * channels * sizeof(uint8_t));
fcv::imwrite("fcv.jpg", fcv_img);
return 0;
}
截图:
所用图片:
项目中很多函数,包括第三方接口,入参需求是cvmat,我用flycv拿到的是fcvmat,该如何处理呢
如果先编译动态库:
mkdir build
cd build
cmake .. -GNinja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=./Release -DBUILD_SHARED_LIBS=ON -DBUILD_TEST=OFF -DWITH_LIB_PNG=ON -DWITH_LIB_JPEG_TURBO=ON -DBUILD_C=ON
ninja all
则会报如下错:
C:\_\code\FlyCV\build>ninja all
ninja: error: 'third_party/libjpeg-turbo/output/lib/turbojpeg-static.lib', needed by 'modules/flycv_shared.dll', missing and no known rule to make it
必须先编译静态库:
C:\_\code\FlyCV\build>cmake .. -GNinja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=./Release -DBUILD_SHARED_LIBS=OFF -DBUILD_TEST=OFF -DWITH_LIB_PNG=ON -DWITH_LIB_JPEG_TURBO=ON -DBUILD_C=ON
ninja all
静态库编译成功之后,才能正常编译动态库。
需要将输入数据进行量化计算,请问如何处理比较好?
normalize_to_submean_to_reorder只能对三通道图使用,看了下加减乘除或者convertTo暂时没有实现,请问目前有没有办法实现对灰度图的normalize呢?
请问flycv 支持 vs插件ImageWatch吗,能支持这个很重要,调试方便? 或者,opencv 的mat 可以和flycv的mat互相转换也行.
环境:VS2022
命令行:
cmake .. -GNinja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=./Release -DBUILD_SHARED_LIBS=ON -DBUILD_TEST=OFF -DWITH_LIB_PNG=ON -DWITH_LIB_JPEG_TURBO=ON
ninja all
报错信息:
C:\_\3rd\FlyCV\build>ninja all
[1/88] Performing install step for 'zlib'
[0/1] Install the project...
-- Install configuration: "Release"
-- Installing: C:/_/3rd/FlyCV/build/third_party/zlib/output/lib/zlib.lib
-- Installing: C:/_/3rd/FlyCV/build/third_party/zlib/output/bin/zlib.dll
-- Installing: C:/_/3rd/FlyCV/build/third_party/zlib/output/lib/zlibstatic.lib
-- Installing: C:/_/3rd/FlyCV/build/third_party/zlib/output/include/zconf.h
-- Installing: C:/_/3rd/FlyCV/build/third_party/zlib/output/include/zlib.h
-- Installing: C:/_/3rd/FlyCV/build/third_party/zlib/output/share/man/man3/zlib.3
-- Installing: C:/_/3rd/FlyCV/build/third_party/zlib/output/share/pkgconfig/zlib.pc
[2/88] Performing install step for 'libjpeg-turbo'
[0/1] Install the project...
-- Install configuration: "Release"
-- Installing: C:/_/3rd/FlyCV/build/third_party/libjpeg-turbo/output/lib/turbojpeg-static.lib
-- Installing: C:/_/3rd/FlyCV/build/third_party/libjpeg-turbo/output/bin/tjbench.exe
-- Installing: C:/_/3rd/FlyCV/build/third_party/libjpeg-turbo/output/include/turbojpeg.h
-- Installing: C:/_/3rd/FlyCV/build/third_party/libjpeg-turbo/output/lib/jpeg-static.lib
-- Installing: C:/_/3rd/FlyCV/build/third_party/libjpeg-turbo/output/bin/cjpeg.exe
-- Installing: C:/_/3rd/FlyCV/build/third_party/libjpeg-turbo/output/bin/djpeg.exe
-- Installing: C:/_/3rd/FlyCV/build/third_party/libjpeg-turbo/output/bin/jpegtran.exe
-- Installing: C:/_/3rd/FlyCV/build/third_party/libjpeg-turbo/output/bin/rdjpgcom.exe
-- Installing: C:/_/3rd/FlyCV/build/third_party/libjpeg-turbo/output/bin/wrjpgcom.exe
-- Installing: C:/_/3rd/FlyCV/build/third_party/libjpeg-turbo/output/share/doc/libjpeg-turbo/README.ijg
-- Installing: C:/_/3rd/FlyCV/build/third_party/libjpeg-turbo/output/share/doc/libjpeg-turbo/README.md
-- Installing: C:/_/3rd/FlyCV/build/third_party/libjpeg-turbo/output/share/doc/libjpeg-turbo/example.txt
-- Installing: C:/_/3rd/FlyCV/build/third_party/libjpeg-turbo/output/share/doc/libjpeg-turbo/tjexample.c
-- Installing: C:/_/3rd/FlyCV/build/third_party/libjpeg-turbo/output/share/doc/libjpeg-turbo/libjpeg.txt
-- Installing: C:/_/3rd/FlyCV/build/third_party/libjpeg-turbo/output/share/doc/libjpeg-turbo/structure.txt
-- Installing: C:/_/3rd/FlyCV/build/third_party/libjpeg-turbo/output/share/doc/libjpeg-turbo/usage.txt
-- Installing: C:/_/3rd/FlyCV/build/third_party/libjpeg-turbo/output/share/doc/libjpeg-turbo/wizard.txt
-- Installing: C:/_/3rd/FlyCV/build/third_party/libjpeg-turbo/output/share/doc/libjpeg-turbo/LICENSE.md
-- Installing: C:/_/3rd/FlyCV/build/third_party/libjpeg-turbo/output/lib/pkgconfig/libjpeg.pc
-- Installing: C:/_/3rd/FlyCV/build/third_party/libjpeg-turbo/output/lib/pkgconfig/libturbojpeg.pc
-- Installing: C:/_/3rd/FlyCV/build/third_party/libjpeg-turbo/output/lib/cmake/libjpeg-turbo/libjpeg-turboConfig.cmake
-- Installing: C:/_/3rd/FlyCV/build/third_party/libjpeg-turbo/output/lib/cmake/libjpeg-turbo/libjpeg-turboConfigVersion.cmake
-- Installing: C:/_/3rd/FlyCV/build/third_party/libjpeg-turbo/output/lib/cmake/libjpeg-turbo/libjpeg-turboTargets.cmake
-- Installing: C:/_/3rd/FlyCV/build/third_party/libjpeg-turbo/output/lib/cmake/libjpeg-turbo/libjpeg-turboTargets-release.cmake
-- Installing: C:/_/3rd/FlyCV/build/third_party/libjpeg-turbo/output/include/jconfig.h
-- Installing: C:/_/3rd/FlyCV/build/third_party/libjpeg-turbo/output/include/jerror.h
-- Installing: C:/_/3rd/FlyCV/build/third_party/libjpeg-turbo/output/include/jmorecfg.h
-- Installing: C:/_/3rd/FlyCV/build/third_party/libjpeg-turbo/output/include/jpeglib.h
[4/88] Performing build step for 'libpng'
FAILED: third_party/libpng/stamp/libpng-build C:/_/3rd/FlyCV/build/third_party/libpng/stamp/libpng-build
cmd.exe /C "cd /D C:\_\3rd\FlyCV\build\third_party\libpng && "C:\Program Files\CMake\bin\cmake.exe" --build . && "C:\Program Files\CMake\bin\cmake.exe" -E touch C:/_/3rd/FlyCV/build/third_party/libpng/stamp/libpng-build"
[1/24] Generating pnglibconf.out
FAILED: pnglibconf.out C:/_/3rd/FlyCV/build/third_party/libpng/pnglibconf.out
cmd.exe /C "cd /D C:\_\3rd\FlyCV\build\third_party\libpng && "C:\Program Files\CMake\bin\cmake.exe" -DINPUT=C:/_/3rd/FlyCV/build/third_party/libpng/pnglibconf.c -DOUTPUT=C:/_/3rd/FlyCV/build/third_party/libpng/pnglibconf.out -P C:/_/3rd/FlyCV/build/third_party/libpng/scripts/genout.cmake"
鐢ㄤ簬 x64 鐨?Microsoft (R) C/C++ 浼樺寲缂栬瘧鍣?19.34.31935 鐗?
鐗堟潈鎵€鏈?C) Microsoft Corporation銆備繚鐣欐墍鏈夋潈鍒┿€?
pnglibconf.c
C:/_/3rd/FlyCV/build/third_party/libpng/pnglibconf.c(34): fatal error C1083: 鏃犳硶鎵撳紑鍖呮嫭鏂囦欢: 鈥渮lib.h鈥? No such file or directory
CMake Error at scripts/genout.cmake:78 (message):
Failed to generate
C:/_/3rd/FlyCV/build/third_party/libpng/pnglibconf.out.tf1
ninja: build stopped: subcommand failed.
[5/88] Completed 'libjpeg-turbo'
ninja: build stopped: subcommand failed.
单独拎出来报错信息:
C:\_\3rd\FlyCV\build>cmd.exe /C "cd /D C:\_\3rd\FlyCV\build\third_party\libpng && "C:\Program Files\CMake\bin\cmake.exe" -DINPUT=C:/_/3rd/FlyCV/build/third_party/libpng/pnglibconf.c -DOUTPUT=C:/_/3rd/FlyCV/build/third_party/libpng/pnglibconf.out -P C:/_/3rd/FlyCV/build/third_party/libpng/scripts/genout.cmake"
用于 x64 的 Microsoft (R) C/C++ 优化编译器 19.34.31935 版
版权所有(C) Microsoft Corporation。保留所有权利。
pnglibconf.c
C:/_/3rd/FlyCV/build/third_party/libpng/pnglibconf.c(34): fatal error C1083: 无法打开包括文件: “zlib.h”: No such file or directory
CMake Error at scripts/genout.cmake:78 (message):
Failed to generate
C:/_/3rd/FlyCV/build/third_party/libpng/pnglibconf.out.tf1
C:\_\3rd\FlyCV\build>
#include "flycv.h"
void A(fcv::Mat& src_img,fcv::Mat& dst_img){
fcv::crop(src_img, dst_img, fcv::RectI(0,0,100,100));
}
int main(){
std::string raw_img_path = "/sdcard/Android/data/com.baidu.paddle.lite.demo.ssd_detection/cache/raw.jpg";
fcv::Mat raw_img = fcv::imread(raw_img_path);
fsv::dst_img;
A(raw_img,dst_img);
}
平台ARM64 版本V1.1.0
1.1.0文档中说明了解图仅支持JPEG;
链接libpng,发现png解出来的是RGB。。。是不是加转下BGR比较好?
ARM LINUX 交叉编译报错,shuffle应改为:_shuffle,修改后正常
FlyCV-develop/modules/img_transform/color_convert/src/color_convert_arm.cpp:3515:26: error: ‘shuffle’ was not declare
d in this scope
:"r"(shuffle)
FlyCV-develop/modules/img_transform/color_convert/src/color_convert_arm.cpp:3515:26: note: suggested alternative: ‘_s
huffle’
:"r"(shuffle)
~~~~~~
_shuffle
这几个第三方依赖无法自动下载,但可以手动下载,我觉得可以优化一下,怀疑可能和这下bash有关:
这个问题可以通过手动下载第三方依赖来避过去:
cd third_party
git clone --progress --depth=1 -b 2.1.4 [email protected]:libjpeg-turbo/libjpeg-turbo.git libjpeg-turbo
git clone --progress --depth=1 -b libpng16 [email protected]:glennrp/libpng.git libpng
git clone --progress --depth=1 -b v1.2.9 [email protected]:madler/zlib.git zlib
git clone --progress --depth=1 -b release-1.12.1 [email protected]:google/googletest.git gtest
git clone --progress --depth=1 -b v1.6.1 [email protected]:google/benchmark.git benchmark
建议优化fcv_download_dependency
,避免在Windows环境有一些不太方便或明确的依赖。
QNX交叉编译报错
imgcodecs.cpp 函数 strcasecmp未定义,需添加<string.h>
平台: ARM64
版本: release/v1.1.0
fcv::Mat fcv_img = fcv::imread(image_path);
printf("image width=%d, height=%d, channels=%d\n", fcv_img.width(), fcv_img.height(),
fcv_img.channels());
int padding_h = (fcv_img.height() + 1) / 2 * 2 - fcv_img.height();
int padding_w = (fcv_img.width() + 1) / 2 * 2 - fcv_img.width();
fcv::copy_make_border(fcv_img, fcv_img, 0, padding_h, 0, padding_w,
fcv::BorderType::BORDER_CONSTANT, fcv::Scalar(114, 114, 114));
fcv::Mat fcv_yuv_img;
fcv::cvt_color(fcv_img, fcv_yuv_img, fcv::ColorConvertType::CVT_PA_BGR2NV21);
printf("yuv image width=%d, height=%d, channels=%d\n", fcv_yuv_img.width(), fcv_yuv_img.height(),
fcv_yuv_img.channels());
跑到 padding 的时候会崩掉:gdb
Using host libthread_db library "/lib/aarch64-linux-gnu/libthread_db.so.1".
image width=2048, height=1365, channels=3
Program received signal SIGSEGV, Segmentation fault.
__memcpy_generic () at ../sysdeps/aarch64/multiarch/../memcpy.S:185
185 ../sysdeps/aarch64/multiarch/../memcpy.S: No such file or directory.
(gdb) bt
#0 __memcpy_generic () at ../sysdeps/aarch64/multiarch/../memcpy.S:185
#1 0x0000000000415b58 in fcv::copy_make_border_common(fcv::Mat&, fcv::Mat&, int, int, int, int, fcv::BorderType, fcv::Scalar_<double> const&)
()
#2 0x0000000000414394 in fcv::copy_make_border(fcv::Mat&, fcv::Mat&, int, int, int, int, fcv::BorderType, fcv::Scalar_<double> const&) ()
#3 0x0000000000405dec in MiniPadding (img=...) at /home/work/AtlasProjects/MaiAtlas/flycv_test/convert_test.cpp:23
#4 0x0000000000405f18 in main (argc=3, argv=0xfffffffff038) at /home/work/AtlasProjects/MaiAtlas/flycv_test/convert_test.cpp:40
另外,有时候会崩在cvt_color处
w=2048, h=1365
padding成功
w=2048, h=1366
Thread 1 "test" received signal SIGSEGV, Segmentation fault.
_int_malloc (av=av@entry=0xfffeff8e3a70 <main_arena>, bytes=bytes@entry=638400) at malloc.c:3924
3924 malloc.c: No such file or directory.
(gdb) bt
#0 _int_malloc (av=av@entry=0xfffeff8e3a70 <main_arena>, bytes=bytes@entry=638400) at malloc.c:3924
#1 0x0000fffeff807444 in __GI___libc_malloc (bytes=638400) at malloc.c:3075
#2 0x000000000065e720 in fcv::cpu_allocator::cpu_allocator(unsigned long) ()
#3 0x000000000065e284 in fcv::get_allocator_from_platform(unsigned long, fcv::PlatformType, int) ()
#4 0x000000000064ce68 in fcv::Mat::Mat(int, int, fcv::FCVImageType, int, fcv::PlatformType) ()
#5 0x000000000064d7ac in fcv::cvt_color(fcv::Mat const&, fcv::Mat&, fcv::ColorConvertType) ()
测试代码段
fcv::Mat dst;
fcv::Mat src = fcv::imread("user.jpg");
for (int i = 0; i < 20; ++i)
{
unsigned char* p = (unsigned char*)src.data();
int a = p[i];
std::cout << a << " ";
}
std::cout << std::endl;
std::cout << "**" <<std::endl;
fcv::cvt_color(src, src, fcv::ColorConvertType::CVT_PA_BGR2PA_RGB);
for (int i = 0; i < 20; ++i)
{
unsigned char p = (unsigned char)src.data();
int a = p[i];
std::cout << a << " ";
}
输出结果:
65 71 48 66 72 49 66 71 50 65 70 49 64 69 48 67 72 51 70 76
65 71 48 66 72 49 66 71 50 65 70 49 64 69 48 67 72 51 70 76
怎样用这个实现文档图片矫正的功能
开发者您好:
我在使用flycv代码替换opencv实现数据预处理函数时发现,若同时开多个推理线程(包括预处理、推理和后处理),替换flycv后的代码在flycv线程池部分稳定发生崩溃,只有在预处理函数前后加入线程锁才能稳定运行。但opencv不论开几个线程都不会发生这样的现象。烦请排查。
还想请教一下目前imdecode是否无法读取大于4000像素的图片,提示不支持的格式。
/install/flycv/lib/libflycv_shared.so: undefined reference to `std::thread::_State::~_State()@GLIBCXX_3.4.22'
/install/flycv/lib/libflycv_shared.so: undefined reference to `typeinfo for std::thread::_State@GLIBCXX_3.4.22'
/install/flycv/lib/libflycv_shared.so: undefined reference to `std::thread::_M_start_thread(std::unique_ptr\<std::thread::_State, std::default_delete<std::thread::_State> >, void (*)())@GLIBCXX_3.4.22'
FlyCV都是基于C++ API,希望能提供C API,以便我能使用C#/.NET等编程语言直接封装。
编译分支:v1.2.0
编译环境: X86 Linux
编译器:gcc (GCC) 7.4.0
使用指令:
cmake
-DBUILD_TEST=OFF
-DBUILD_BENCHMARK=OFF
-DCMAKE_INSTALL_PREFIX=${build_dir}/install
-DWITH_LIB_PNG=ON
-DWITH_LIB_JPEG_TURBO=ON
-DCMAKE_BUILD_TYPE=Release
-DENABLE_AVX=ON
..
make -j32
编译报错:
/world/FlyCV/modules/core/base/include/common_avx.h: In member function ‘void fcv::Vld3_F32x8_Avx::load(const float*, __m256i*, __m256i*, __m256i*)’:
/home/chenjunpin/world/FlyCV/modules/core/base/include/common_avx.h:366:25: error: ‘_mm256_loadu2_m128i’ was not declared in this scope
__m256i bgr_0 = _mm256_loadu2_m128i((__m128i const*)(src_f32 + 12), (__m128i const*)(src_f32 + 0));
^~~~~~~~~~~~~~~~~~~
/world/FlyCV/modules/core/base/include/common_avx.h:366:25: note: suggested alternative: ‘_mm256_loadu_si256’
__m256i bgr_0 = _mm256_loadu2_m128i((__m128i const*)(src_f32 + 12), (__m128i const*)(src_f32 + 0));
1、使用 gcc -march=native -E -v - </dev/null 2>&1 | grep avx 查看GCC支持,确认编译器支持-mavx -mavx2
2、请问是否是因为GCC版本不一致的原因导致报错?
什么时候python能用
直接 pip install FlyCV
这样就可以替换opencv
另外可以增加读取摄像头 读取视频文件的
图像处理 增加 裁剪
Cmake中已add_subdirectory方式编译flycv,编译出错
cv::rectangle和cv::putText在AI cv里面使用频率非常高,是否可以考虑支持
flycv版本:flycv-v1.0.0-android.tar
平台:展锐T610 CPU armv7
复现步骤:读取本地图片,然后调用画图函数,最后保存画图后的数据,保存的图片上没有画图结果
参考代码:
std::string raw_img_path = "/sdcard/Android/data/com.baidu.paddle.lite.demo.ssd_detection/cache/raw.jpg";
fcv::Mat raw_img = fcv::imread(raw_img_path);
fcv::circle(raw_img,fcv::Point(500,500),100,fcv::Scalar(0,0,100),2);
std::string res_img_path = "/sdcard/Android/data/com.baidu.paddle.lite.demo.ssd_detection/cache/raw_res.jpg";
fcv::imwrite(res_img_path, raw_img);
first
opencv设计该函数的时候没有用引用: void cv::extractChannel(InputArray _src, OutputArray _dst, int coi)
flyCV的定义是 FCV_API int extract_channel(Mat& src,Mat& dst, int index);
问题,下面写法会报错:error: undefined reference to 'fcv::extract_channel(fcv::Mat&, fcv::Mat, int)'
g_fcv_ns::extract_channel(preimg, g_fcv_ns::Mat(cols, rows,g_fcv_ns::FCVImageType::GRAY_F32,data +i * rows * cols), i);
Second
目前只支持u8类型,导致只支持int8模型,flyCV的巨大威力被卡脖子了。
希望能尽快增加copymakeborder的其他模式,谢谢!
请问一下,flycv有没有类似于putText方法,在图像上绘制文字,并且支持中文的
请问有哈达玛积吗?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.