Indexcropping
You can edit code on OBS Console or make an API call to crop images based on indexes.
Set the top left corner of the image as the starting point. Set x-axis overlapping with the width, and y-axis overlapping with the height. Crop the image into several consecutive partitions horizontally or vertically, each having equal width or height. Get the partition you want according to the index. For details, see Table 1.
Operation name: indexcrop
Parameter |
Value Description |
Code Example |
---|---|---|
x |
Width of each partition after horizontal cropping, ranging [1, original width of the image]. x and y cannot be chosen at the same time. |
image/indexcrop,x_1000,i_0 |
y |
Height of each partition after vertical cropping, ranging [1, original height of the image]. x and y cannot be chosen at the same time. |
|
i |
If there are n partitions in total, i ranges [0, n-1]. When i = 0, you obtain the first partition. If you set a value larger than n-1, the original image will be returned. |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot