original image
expands the image outwards according to the pixel value of the image boundary, expanding 50 pixels in each direction.
a = cv2. CopyMakeBorder (img, 50,50,50,50, cv2. BORDER_REPLICATE) p>
near the boundary of the 50 pixels fold out (axisymmetric) :
a = cv2. CopyMakeBorder (img, 50,50,50,50, cv2 BORDER_REFLECT)
p>
constant fill:
a = cv2.copymakeborder (img,50,50,50, cv2.border_constant,value=[0,255,0])
Read More:
- Python opencv (3) get image size
- How to install IDM Extension in Chromium-based Microsoft Edge (Canary/Dev)
- VTK cultivation 26: basic operation of image_ Three dimensional image slice extraction
- Install python’s C extension compilation environment under windows (solve “error: command’cl.exe’ failed: No such file or directory”)
- Install Python C extension compiler environment under windows (solve “error: command” cl.exe ‘ failed: No such file or directory”)
- Ueditor paste word image and upload image file automatically
- Edge detection: two methods
- Error reporting of OpenCV and Darknet under Python 2.7
- Reading and saving opencv Python video
- Opencv perfect configuration strategy 2015 (win7 + opencv 2.4.9 + vs 2013)
- Anaconda installation opencv Python error solution
- Installing opencv Python in docker container
- Python Anaconda Spyder can’t display pictures by using Matplotlib. Error report solution: figures now render in the plots pane by default. To mak
- Microsoft edge was unable to log in. Error code: 3,15, – 2147023579
- Solution of OpenCV library import error in Python 3
- Solution of selenium driven edge error reporting
- Install Oracle VM VirtualBox Extension Pack failed to install the extension pack
- [docker] error in deleting image: image is referenced in multiple repositories
- Ant Design upload listtype = “picture card” realizes multi image upload and click preview image encapsulation
- Opencv problem: opencv error: assertion failed (! Empty()) in detectmultiscale