Giter Site home page Giter Site logo

yolo_boundingbox_center_point's Introduction

yolo_boundingbox_center_point

//changed here in image.c file

    // * Print bounding box values 

    printf("Bounding Box : Left=%d, Top=%d, Right=%d, Bottom=%d\n", left, top, right,bot);
    printf("Center_x: %d , Center_Y: %d ", (left+((right-left)/2)),(top+((bot-top)/2))); 
        draw_box_width(im, left, top, right, bot, width, red, green, blue);
        if (alphabet) {
            image label = get_label(alphabet, labelstr, (im.h*.03));
            draw_label(im, top + width, left, label, rgb);
            free_image(label);
        }

you must download OpenCV to excute a Potin.py files

import cv2
img= cv2.imread("predictions.jpg", cv2.IMREAD_COLOR)


cv2.circle(img, (382,115), 5, (0,0,255), -1)
cv2.circle(img, (126,112), 5, (0,0,255), -1)
cv2.circle(img, (382,312), 5, (0,0,255), -1)
cv2.circle(img, (131,315), 5, (0,0,255), -1)

#ex) 코드는 중심점 (447,63)이고 반지름은 63인 원을 빨간색(0,0,255)으로 하여 굵기속성은 -1로 함으로써 도형을 채움형태로 그리는 코드입니다.

cv2.namedWindow('center points')
cv2.imshow("center points", img)
cv2.waitKey(0)

#imwrite를 사용해서 파일로저장가능 첫번째 매개변수로는 저장할 파일이름 두번쨰 매개변수로는 저장할 이미지변수
cv2.imwrite("savedimage.jpg", img)
#프로그램 종료전 윈도우에대한 자원을 해제한다.
cv2.destoryAllWindows() 

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.