https://github.com/corentinb/gobbox
:white_square_button: Pure Go bounding boxes generation with labeling
https://github.com/corentinb/gobbox
Last synced: 8 months ago
JSON representation
:white_square_button: Pure Go bounding boxes generation with labeling
- Host: GitHub
- URL: https://github.com/corentinb/gobbox
- Owner: CorentinB
- Created: 2018-11-28T09:18:34.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-11-28T12:56:53.000Z (over 7 years ago)
- Last Synced: 2025-09-21T09:35:11.639Z (9 months ago)
- Language: Go
- Size: 2.93 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[](https://forthebadge.com)[](https://forthebadge.com)
[](https://travis-ci.org/CorentinB/gobbox)
[](https://goreportcard.com/report/github.com/CorentinB/gobbox)
[](https://godoc.org/github.com/CorentinB/gobbox)
# GoBBox
:white_square_button: Pure Go bounding boxes generation with labeling
# Install
`go get -u github.com/CorentinB/gobbox`
# Examples
Simple example of applying a bounding box and a label to an image.
```go
// Colors declarations
red := color.RGBA{255, 0, 0, 255}
white := color.RGBA{255, 255, 255, 255}
// Create a 300x300 image initialized to all-blue
img := image.NewRGBA(image.Rect(0, 0, 640, 480))
blue := color.RGBA{0, 0, 255, 255}
draw.Draw(img, img.Bounds(), &image.Uniform{blue}, image.ZP, draw.Src)
// Write a red bounding box with the "gobbox" label with white font
// at coordinates 100, 250, 238, 68
gobbox.DrawBoundingBox(img, "gobbox", 100, 250, 238, 68, red, white)
```