-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Image preprocessing #7
Comments
문제점이 생김.
|
resize하기 좋은 image api 두 개. 그 중 PIL을 사용하고 있었으므로 PIL을 사용해서 interpolation을 조정해 보는 걸로. PILOpen CVSample code#-*- coding:utf-8 import cv2 img = cv2.imread('images/logo.png') 행 : Height, 열:widthheight, width = img.shape[:2] 이미지 축소shrink = cv2.resize(img, None, fx=0.5, fy=0.5, interpolation=cv2.INTER_AREA) Manual Size지정zoom1 = cv2.resize(img, (width2, height2), interpolation=cv2.INTER_CUBIC) 배수 Size지정zoom2 = cv2.resize(img, None, fx=2, fy=2, interpolation=cv2.INTER_CUBIC) |
Nearest 방법으로 해도 안된다.. 각 슬라이스별로 같은 label에 대해서 같은 값으로 바뀌면 좋겠지만 이미지를 2D 이미지를 한장씩 슬라이스하면서 변환하다 보니까 각 이미지마다 들어있는 class개수가 다르기때문에 다른 값이 배정된다. 여기에 대한 해결책은 image로 변환하는것없이 단순히 array에서 resize할 수 있는 방법을 찾는 것이다. 참고로 image에 대해서는 interpolation이 좋고, mask에 대해서만 array에서 변화하는게 좋음 |
dltk로 해결! |
MR label directory 9번째 image가 다른 값이 들어가 있음.
label: [ 0 205 420 421 500 550 600 820 850] |
resizing이 끝이 아니였다. 그래서 새롭게 코드를 2단계로 구성하여 해결하였다.
|
앞으로 해야할 일 |
현재
TODO.
-> CT의 경우 대부분 심장이지만, MR사진의 경우 영상의 범위가 목~복부까지 넓게 보여진다.
The text was updated successfully, but these errors were encountered: