Learn Before
Slicing / Copying Portions of the Image
Using the idea that the data is stored inside a numpy array, we can splice the information from the array.
Given an img object, we can use:
sliced_img = img[500:700, 600:900] img[100:300, 650:950] = tag
It is important to pick a region that is the same size as what you copied.
Therefore, you can use this idea with a UI to select a region and get the right pixel values. Otherwise to slice/copy you need to know the exact pixel values ahead of time.
0
1
Tags
Python Programming Language
Data Science
Related
Loading in Assets in OpenCV
Displaying Images
Resizing Images
Rotating Images
Conceptual Breakdown of OpenCV Image Storage
Slicing / Copying Portions of the Image
Creating Text
Project Directory Structure for OpenCV
Shape Creation in OpenCV
Writing Images (OpenCV)
Live Video Feed Processing in OpenCV
Installing and Importing OpenCV