feat: 切换后端至PaddleOCR-NCNN,切换工程为CMake
1.项目后端整体迁移至PaddleOCR-NCNN算法,已通过基本的兼容性测试 2.工程改为使用CMake组织,后续为了更好地兼容第三方库,不再提供QMake工程 3.重整权利声明文件,重整代码工程,确保最小化侵权风险 Log: 切换后端至PaddleOCR-NCNN,切换工程为CMake Change-Id: I4d5d2c5d37505a4a24b389b1a4c5d12f17bfa38c
This commit is contained in:
48
3rdparty/opencv-4.5.4/samples/python/tutorial_code/highgui/trackbar/AddingImagesTrackbar.py
vendored
Normal file
48
3rdparty/opencv-4.5.4/samples/python/tutorial_code/highgui/trackbar/AddingImagesTrackbar.py
vendored
Normal file
@ -0,0 +1,48 @@
|
||||
from __future__ import print_function
|
||||
from __future__ import division
|
||||
import cv2 as cv
|
||||
import argparse
|
||||
|
||||
alpha_slider_max = 100
|
||||
title_window = 'Linear Blend'
|
||||
|
||||
## [on_trackbar]
|
||||
def on_trackbar(val):
|
||||
alpha = val / alpha_slider_max
|
||||
beta = ( 1.0 - alpha )
|
||||
dst = cv.addWeighted(src1, alpha, src2, beta, 0.0)
|
||||
cv.imshow(title_window, dst)
|
||||
## [on_trackbar]
|
||||
|
||||
parser = argparse.ArgumentParser(description='Code for Adding a Trackbar to our applications tutorial.')
|
||||
parser.add_argument('--input1', help='Path to the first input image.', default='LinuxLogo.jpg')
|
||||
parser.add_argument('--input2', help='Path to the second input image.', default='WindowsLogo.jpg')
|
||||
args = parser.parse_args()
|
||||
|
||||
## [load]
|
||||
# Read images ( both have to be of the same size and type )
|
||||
src1 = cv.imread(cv.samples.findFile(args.input1))
|
||||
src2 = cv.imread(cv.samples.findFile(args.input2))
|
||||
## [load]
|
||||
if src1 is None:
|
||||
print('Could not open or find the image: ', args.input1)
|
||||
exit(0)
|
||||
|
||||
if src2 is None:
|
||||
print('Could not open or find the image: ', args.input2)
|
||||
exit(0)
|
||||
|
||||
## [window]
|
||||
cv.namedWindow(title_window)
|
||||
## [window]
|
||||
|
||||
## [create_trackbar]
|
||||
trackbar_name = 'Alpha x %d' % alpha_slider_max
|
||||
cv.createTrackbar(trackbar_name, title_window , 0, alpha_slider_max, on_trackbar)
|
||||
## [create_trackbar]
|
||||
|
||||
# Show some stuff
|
||||
on_trackbar(0)
|
||||
|
||||
# Wait until user press some key
|
||||
cv.waitKey()
|
Reference in New Issue
Block a user