Я пытаюсь найти минимальную ограничивающую рамку для набора точек. Я использовал библиотеку https://bitbucket.org/william_rusnack/minimumboundingbox/src/master/
Я хочу заключить эти координаты в минимальную ограничивающую рамку: -
#INPUT COORDINATES
('297.153338872911', '373.3796368193535')
('222.75', '278.7499999999999')
('222.75', '278.7499999999999')
('42.25', '251.75')
('179.25', '390.5')
('298.403338872911', '373.3796368193535')
('0.6400000000000537', '240.0000000000201')
('75.26400000000632', '390.9120000000328')
# OUTPUT BOUNDING BOX COORDINATES , PLOTTED
[(-22.685403520024096, 373.8408037637353),
(0.6400000000000432, 240.0),
(288.84381342985046, 428.133250381587),
(312.16921694987457, 294.2924466178517)]

But as you can see from the output itself
the bounding box is coming out as tilted/inclined . That's all right, but what I want is for the bounding box to be straight to the horizontal & vertical plane of my desktop. How can I achieve this without losing the bounding box functionality (i.e. any point popping out of the bounding box while making it straight) ?
I tried this code также , но он поворачивает прямоугольник и находит наилучшую возможную ограничивающую рамку, которая в большинстве случаев представляет собой наклонный прямоугольник. Но мне строго нужен прямой прямоугольник.