This repository has been archived by the owner on Jan 4, 2024. It is now read-only.
generated from Neutree/c_cpp_project_framework
-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[dls831] example for serial_openmv_opencv
- Loading branch information
1 parent
9b90bb8
commit 6ad1102
Showing
27 changed files
with
8,244 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
|
||
if(CONFIG_COMPONENT_MAIX_DLS831_ENABLE) | ||
|
||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O1 -g -Wno-strict-aliasing") | ||
|
||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O1 -g -Wno-strict-aliasing -fpermissive") | ||
|
||
list(APPEND ADD_INCLUDE "include") | ||
add_definitions(-DIMLIB_CONFIG_H_FILE="costom_imlib_config.h") | ||
|
||
append_srcs_dir(ADD_SRCS "lib") | ||
append_srcs_dir(ADD_SRCS "src") | ||
|
||
# include_directories(${CMAKE_CURRENT_SOURCE_DIR}/libcedarc) | ||
# include_directories(${CMAKE_CURRENT_SOURCE_DIR}/libcedarc/include) | ||
# include_directories(${CMAKE_CURRENT_SOURCE_DIR}/libcedarc/include/base) | ||
# link_directories(${CMAKE_CURRENT_SOURCE_DIR}/libcedarc/library) | ||
############ Add static libs ################## | ||
# list(APPEND ADD_STATIC_LIB "core/lib/libmaix_nn.a") | ||
############################################### | ||
|
||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../libmaix/include) | ||
|
||
if(CMAKE_COMPILER_IS_GNUCXX) | ||
# add_compile_options(-std=c++11) | ||
message(STATUS "optional:-std=c++11") | ||
endif(CMAKE_COMPILER_IS_GNUCXX) | ||
############ Add dynamic libs ################## | ||
if(CONFIG_ARCH_V831) | ||
|
||
# list(APPEND ADD_INCLUDE "../third_party/quirc") | ||
# append_srcs_dir(ADD_SRCS "../third_party/quirc") | ||
|
||
# list(APPEND ADD_INCLUDE "../third_party/zbar/include/") | ||
# append_srcs_dir(ADD_SRCS "../third_party/zbar") | ||
|
||
# list(APPEND ADD_INCLUDE "../third_party/apriltag/common") | ||
# append_srcs_dir(ADD_SRCS "../third_party/apriltag/common") | ||
# list(APPEND ADD_INCLUDE "../third_party/apriltag") | ||
# append_srcs_dir(ADD_SRCS "../third_party/apriltag") | ||
# list(REMOVE_ITEM ADD_SRCS "../third_party/apriltag/apriltag_pywrap.c") | ||
|
||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../third_party/imlib/include) | ||
list(APPEND ADD_INCLUDE "${CMAKE_CURRENT_SOURCE_DIR}/include") | ||
add_definitions(-DIMLIB_CONFIG_H_FILE="costom_imlib_config.h") | ||
append_srcs_dir(ADD_SRCS "../third_party/imlib/src") | ||
|
||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../libmaix/lib/arch/v83x/include/opencv4) | ||
|
||
# list(APPEND ADD_REQUIREMENTS maix_speech) | ||
|
||
list(APPEND ADD_DYNAMIC_LIB | ||
# "lib/libzbar.so" | ||
# "lib/libzbar.so.0" | ||
# "lib/libapriltag.so" | ||
# "lib/libapriltag.so.3" | ||
"../libmaix/lib/arch/v831/libmaix_nn.so" | ||
"../libmaix/lib/arch/v831/libmaix_image.so" | ||
"../libmaix/lib/arch/v83x/lib/libfreetype.so" | ||
"../libmaix/lib/arch/v83x/lib/libbz2.so" | ||
"../libmaix/lib/arch/v83x/lib/libjpeg.so" | ||
"../libmaix/lib/arch/v83x/lib/libpng12.so" | ||
"../libmaix/lib/arch/v83x/lib/libwebp.so" | ||
# "../libmaix/lib/arch/v83x/opencv4/libopencv_videoio.so" | ||
# "../libmaix/lib/arch/v83x/opencv4/libopencv_highgui.so" | ||
"../libmaix/lib/arch/v83x/opencv4/libopencv_imgcodecs.so" | ||
"../libmaix/lib/arch/v83x/opencv4/libopencv_imgproc.so" | ||
"../libmaix/lib/arch/v83x/opencv4/libopencv_core.so" | ||
) | ||
else() | ||
|
||
endif() | ||
############################################### | ||
|
||
register_component(DYNAMIC) | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
config COMPONENT_MAIX_DLS831_ENABLE | ||
bool "Enable maix_dls831 component" | ||
default n | ||
help | ||
Select this option to enable use maix_dls831 base on opencv4 with lvgl. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,170 @@ | ||
/* | ||
* This file is part of the OpenMV project. | ||
* | ||
* Copyright (c) 2013-2021 Ibrahim Abdelkader <iabdalkader@openmv.io> | ||
* Copyright (c) 2013-2021 Kwabena W. Agyeman <kwagyeman@openmv.io> | ||
* | ||
* This work is licensed under the MIT license, see the file LICENSE for details. | ||
* | ||
* Image library configuration. | ||
*/ | ||
// #define IMLIB_CONFIG_H_FILE "costom_imlib_config.h" | ||
#ifndef __IMLIB_CONFIG_H__ | ||
#define __IMLIB_CONFIG_H__ | ||
#ifdef __cplusplus | ||
extern "C" | ||
{ | ||
#endif | ||
// // Enable Image I/O | ||
// #define IMLIB_ENABLE_IMAGE_IO | ||
|
||
// // Enable Image File I/O | ||
#define IMLIB_ENABLE_IMAGE_FILE_IO | ||
|
||
// // Enable LAB LUT | ||
// // #define IMLIB_ENABLE_LAB_LUT | ||
|
||
// // Enable YUV LUT | ||
// // #define IMLIB_ENABLE_YUV_LUT | ||
|
||
// // Enable mean pooling | ||
// #define IMLIB_ENABLE_MEAN_POOLING | ||
|
||
// // Enable midpoint pooling | ||
// #define IMLIB_ENABLE_MIDPOINT_POOLING | ||
|
||
// // Enable binary ops | ||
// #define IMLIB_ENABLE_BINARY_OPS | ||
|
||
// // Enable math ops | ||
// #define IMLIB_ENABLE_MATH_OPS | ||
|
||
// // Enable flood_fill() | ||
// #define IMLIB_ENABLE_FLOOD_FILL | ||
|
||
// // Enable mean() | ||
// #define IMLIB_ENABLE_MEAN | ||
|
||
// // Enable median() | ||
// #define IMLIB_ENABLE_MEDIAN | ||
|
||
// // Enable mode() | ||
// #define IMLIB_ENABLE_MODE | ||
|
||
// // Enable midpoint() | ||
// #define IMLIB_ENABLE_MIDPOINT | ||
|
||
// // Enable morph() | ||
// #define IMLIB_ENABLE_MORPH | ||
|
||
// // Enable Gaussian | ||
// #define IMLIB_ENABLE_GAUSSIAN | ||
|
||
// // Enable Laplacian | ||
// #define IMLIB_ENABLE_LAPLACIAN | ||
|
||
// // Enable bilateral() | ||
// #define IMLIB_ENABLE_BILATERAL | ||
|
||
// // Enable cartoon() | ||
// #define IMLIB_ENABLE_CARTOON | ||
|
||
// // Enable linpolar() | ||
// #define IMLIB_ENABLE_LINPOLAR | ||
|
||
// // Enable logpolar() | ||
// #define IMLIB_ENABLE_LOGPOLAR | ||
|
||
// // Enable lens_corr() | ||
#define IMLIB_ENABLE_LENS_CORR | ||
|
||
// Enable find_apriltags() (64 KB) | ||
// #define IMLIB_ENABLE_APRILTAGS | ||
|
||
// // Enable fine find_apriltags() - (8-way connectivity versus 4-way connectivity) | ||
// // #define IMLIB_ENABLE_FINE_APRILTAGS | ||
|
||
// // Enable high res find_apriltags() - uses more RAM | ||
// // #define IMLIB_ENABLE_HIGH_RES_APRILTAGS | ||
|
||
// // Enable rotation_corr() | ||
// #if defined(IMLIB_ENABLE_APRILTAGS) | ||
// #define IMLIB_ENABLE_ROTATION_CORR | ||
// #endif | ||
|
||
// // Enable phasecorrelate() | ||
// #if defined(IMLIB_ENABLE_ROTATION_CORR) | ||
// #define IMLIB_ENABLE_FIND_DISPLACEMENT | ||
// #endif | ||
|
||
// // Enable find_rects() | ||
// #if defined(IMLIB_ENABLE_ROTATION_CORR) | ||
// #define IMLIB_ENABLE_FIND_RECTS | ||
// #endif | ||
|
||
// // Enable get_similarity() | ||
// #define IMLIB_ENABLE_GET_SIMILARITY | ||
|
||
// // Enable find_lines() | ||
#define IMLIB_ENABLE_FIND_LINES | ||
|
||
// // Enable find_line_segments() | ||
#define IMLIB_ENABLE_FIND_LINE_SEGMENTS | ||
|
||
// Enable find_circles() | ||
#define IMLIB_ENABLE_FIND_CIRCLES | ||
|
||
// // Enable find_qrcodes() (14 KB) | ||
// #define IMLIB_ENABLE_QRCODES | ||
|
||
// // Enable find_datamatrices() (26 KB) | ||
// #define IMLIB_ENABLE_DATAMATRICES | ||
|
||
// // Enable find_barcodes() (42 KB) | ||
// #define IMLIB_ENABLE_BARCODES | ||
|
||
// // Enable CMSIS NN | ||
// // #if !defined(CUBEAI) | ||
// // #define IMLIB_ENABLE_CNN | ||
// // #endif | ||
|
||
// // Enable Tensor Flow | ||
// #if !defined(CUBEAI) | ||
// #define IMLIB_ENABLE_TF | ||
// #endif | ||
|
||
// Enable FAST (20+ KBs). | ||
#define IMLIB_ENABLE_FAST | ||
|
||
// // Enable find_template() | ||
// #define IMLIB_FIND_TEMPLATE | ||
|
||
// // Enable find_lbp() | ||
// // #define IMLIB_ENABLE_FIND_LBP | ||
|
||
// // Enable find_keypoints() | ||
// #define IMLIB_ENABLE_FIND_KEYPOINTS | ||
|
||
// // Enable load, save and match descriptor | ||
// #define IMLIB_ENABLE_DESCRIPTOR | ||
|
||
// // Enable find_hog() | ||
// //#define IMLIB_ENABLE_HOG | ||
|
||
// // Enable selective_search() | ||
// #define IMLIB_ENABLE_SELECTIVE_SEARCH | ||
|
||
// // Enable PRINT | ||
// // #define IMLIB_ENABLE_PRINT | ||
|
||
// FB Heap Block Size | ||
#define OMV_UMM_BLOCK_SIZE 256 | ||
|
||
#define OMV_FB_ALLOC_SIZE (2 * 1024 * 1024) // minimum fb alloc size | ||
|
||
// Enable STM32 DMA2D | ||
// #define IMLIB_ENABLE_DMA2D | ||
#ifdef __cplusplus | ||
} | ||
#endif | ||
#endif //__IMLIB_CONFIG_H__ |
Oops, something went wrong.