рабочая лаба 8
This commit is contained in:
BIN
lab8/input.jpeg
Normal file
BIN
lab8/input.jpeg
Normal file
Binary file not shown.
After Width: | Height: | Size: 127 KiB |
@@ -1,8 +1,10 @@
|
||||
import cv2
|
||||
import numpy as np
|
||||
from PIL import Image, ImageDraw
|
||||
|
||||
|
||||
def main():
|
||||
image = Image.open('D:\\MACH\\MACH\\LAB_2\\img1.jpg')
|
||||
image = Image.open('input.jpeg')
|
||||
image_arr = np.asarray(image)
|
||||
|
||||
hog = cv2.HOGDescriptor()
|
||||
@@ -11,8 +13,9 @@ def main():
|
||||
detections_rectangles = detections.tolist()
|
||||
draw = ImageDraw.Draw(image)
|
||||
for x, y, w, h in detections_rectangles:
|
||||
draw.rectangle(
|
||||
[x, y, x + w, y + h], outline=(255, 0, 0))
|
||||
draw.rectangle((x, y, x + w, y + h), outline=(255, 0, 0))
|
||||
image.show()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
Reference in New Issue
Block a user