feat: 切换后端至PaddleOCR-NCNN,切换工程为CMake
1.项目后端整体迁移至PaddleOCR-NCNN算法,已通过基本的兼容性测试 2.工程改为使用CMake组织,后续为了更好地兼容第三方库,不再提供QMake工程 3.重整权利声明文件,重整代码工程,确保最小化侵权风险 Log: 切换后端至PaddleOCR-NCNN,切换工程为CMake Change-Id: I4d5d2c5d37505a4a24b389b1a4c5d12f17bfa38c
This commit is contained in:
51
3rdparty/opencv-4.5.4/samples/python/tutorial_code/imgProc/Pyramids/pyramids.py
vendored
Normal file
51
3rdparty/opencv-4.5.4/samples/python/tutorial_code/imgProc/Pyramids/pyramids.py
vendored
Normal file
@ -0,0 +1,51 @@
|
||||
import sys
|
||||
import cv2 as cv
|
||||
|
||||
|
||||
def main(argv):
|
||||
print("""
|
||||
Zoom In-Out demo
|
||||
------------------
|
||||
* [i] -> Zoom [i]n
|
||||
* [o] -> Zoom [o]ut
|
||||
* [ESC] -> Close program
|
||||
""")
|
||||
## [load]
|
||||
filename = argv[0] if len(argv) > 0 else 'chicky_512.png'
|
||||
|
||||
# Load the image
|
||||
src = cv.imread(cv.samples.findFile(filename))
|
||||
|
||||
# Check if image is loaded fine
|
||||
if src is None:
|
||||
print ('Error opening image!')
|
||||
print ('Usage: pyramids.py [image_name -- default ../data/chicky_512.png] \n')
|
||||
return -1
|
||||
## [load]
|
||||
## [loop]
|
||||
while 1:
|
||||
rows, cols, _channels = map(int, src.shape)
|
||||
## [show_image]
|
||||
cv.imshow('Pyramids Demo', src)
|
||||
## [show_image]
|
||||
k = cv.waitKey(0)
|
||||
|
||||
if k == 27:
|
||||
break
|
||||
## [pyrup]
|
||||
elif chr(k) == 'i':
|
||||
src = cv.pyrUp(src, dstsize=(2 * cols, 2 * rows))
|
||||
print ('** Zoom In: Image x 2')
|
||||
## [pyrup]
|
||||
## [pyrdown]
|
||||
elif chr(k) == 'o':
|
||||
src = cv.pyrDown(src, dstsize=(cols // 2, rows // 2))
|
||||
print ('** Zoom Out: Image / 2')
|
||||
## [pyrdown]
|
||||
## [loop]
|
||||
|
||||
cv.destroyAllWindows()
|
||||
return 0
|
||||
|
||||
if __name__ == "__main__":
|
||||
main(sys.argv[1:])
|
Reference in New Issue
Block a user