Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Library for detecting lungs on chest x-ray images for further processing. It is fast and able to work on embedded devices.

License

NotificationsYou must be signed in to change notification settings

dirtmaxim/lungs-finder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Library for lungs detection on CXR images

Requirements:- Python 3;- OpenCV3.
Installation:- pip install lungs-finder
You can test your dataset using lungs_viewer.py.It is a program that is displayed on the screenshot above.Usage: lungs_viewer.py /your/dataset TrueThe last parameter defines whether labels will be displayed or not.
You can get lungs using HOG, Haar or LBP.Example:import lungs_finder as lfimage = cv2.imread("/your/image/cxr.png", 0)# Get both lungs image. It uses HOG as main method,# but if HOG found nothing it uses HAAR or LBP.found_lungs = lf.get_lungs(image)if found_lungs is not None:    cv2.imshow("Found lungs", found_lungs)    code = cv2.waitKey(0)# Or you can get left or right lung independently using HOG, Haar or LBP.right_lung_hog_rectangle = lf.find_right_lung_hog(scaled_image)left_lung_hog_rectangle = lf.find_left_lung_hog(scaled_image)right_lung_lbp_rectangle = lf.find_right_lung_lbp(scaled_image)left_lung_lbp_rectangle = lf.find_left_lung_lbp(scaled_image)right_lung_haar_rectangle = lf.find_right_lung_haar(scaled_image)left_lung_haar_rectangle = lf.find_left_lung_haar(scaled_image)if right_lung_hog_rectangle is not None:    x, y, width, height = right_lung_hog_rectangle    right_image = image[y:y + height, x:x + width]    cv2.imshow("Right lung", right_image)    code = cv2.waitKey(0)

[8]ページ先頭

©2009-2025 Movatter.jp