Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
# Gepuk
# Gepuk

The FRCNNODP folder is code for testing faster r-cnn models that have been trained for people detectors
change the directory into FRCNNODP for testing
43 changes: 43 additions & 0 deletions countertutupbotol.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
import numpy as np
import cv2 as cv

import sys

def main():
fn = 'img/botol.jpg'

src = cv.imread(fn)
img = cv.cvtColor(src, cv.COLOR_BGR2GRAY)
img = cv.medianBlur(img, 5)
cimg = src.copy() # numpy function

circles = cv.HoughCircles(img, cv.HOUGH_GRADIENT, 1, 10, np.array([]), 69, 21, 9, 26)

counter = 0
if circles is not None: # Check if circles have been found and only then iterate over these and add them to the image
_a, b, _c = circles.shape
for i in range(b):
cv.circle(
cimg, (circles[0][i][0],
circles[0][i][1]),
circles[0][i][2],
(0, 0, 255), 2, cv.LINE_AA
)
cv.circle(
cimg, (circles[0][i][0],
circles[0][i][1]), 2,
(0, 255, 0), 3, cv.LINE_AA
) # draw center of circle
counter += 1

print(f'counter ;', counter)
cv.imshow("detected circles", cimg)

cv.imshow("source", src)
cv.waitKey(0)
print('Done')


if __name__ == '__main__':
main()
cv.destroyAllWindows()
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions data/document.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
testing
Loading