我有一個ArrayList
的2D點。如何使用java創建使用這些點的矩形?如何使用一組點來創建邊界框?
點的ArrayList
是:
[277.0,275.0,269.0,271.0,260.0,268.0,184.0,277.0,160.0,288.0,137.0,303.0,115.0,319.0,97.0,337.0,80.0 ,357.0,67.0,375.0,59.0,394.0,55.0,413.0,53.0,433.0,55.0,456.0,59.0,482.0,66.0,507.0,77.0,534.0,90.0,558.0,103.0,578.0,117.0,594.0,131.0,607.0 ,147.0,616.0,163.0,622.0,179.0,624.0,198.0,623.0,221.0,618.0,244.0,608.0,266.0,595.0,284.0,581.0,300.0,565.0,316.0,548.0,329.0,530.0,339.0,511.0,348.0 ,493.0,355.0,473.0,361.0,454.0,364.0,436.0,367.0,420.0,368.0,403.0,367.0,388.0,366.0,371.0,360.0,338.0,356.0,323.0,349.0,309.0,343.0,298.0,337.0,289.0 ,329.0,283.0,320.0 ,280.0,309.0,281.0,299.0,282.0,299.0,282.0,277.0,275.0]
我不知道我怎麼去創造。 –