Revision history [back]

opencv segmentation

I am working on a project in which i need segmentated video but after apply the segmentation to the video as given in the opencv docs , the human person i m getting is not complete white. My means of say that is there is a boundary of white pixel around the person and inside part is black and the same color as background(black). Can any one help me to obtain the completely white pixeled human person ! Thanks...

My code is :

import numpy as np import cv2

cap=cv2.VideoCapture('sample4.avi') #argument 0 represent the camera number 0 of the computer

fourcc=cv2.VideoWriter_fourcc('X','V','I','D')

fourcc = cv2.cv.CV_FOURCC(*'XVID')

fgbg=cv2.createBackgroundSubtractorMOG()

fgbg = cv2.BackgroundSubtractorMOG() out=cv2.VideoWriter('Segmented_Recorded_video.avi',fourcc,20.0,(640,480))

cap.release() out.release() cv2.destroyAllWindows()

 2 No.2 Revision FooBar 2938 ●9 ●37 http://magazino.eu/

opencv segmentation

I am working on a project in which i need segmentated video but after apply the segmentation to the video as given in the opencv docs , the human person i m getting is not complete white. My means of say that is there is a boundary of white pixel around the person and inside part is black and the same color as background(black). Can any one help me to obtain the completely white pixeled human person ! Thanks...

My code is :

import numpy as np
import cv2cv2
cap=cv2.VideoCapture('sample4.avi') #argument 0 represent the camera number 0 of the computercomputer
fourcc=cv2.VideoWriter_fourcc('X','V','I','D') #fourcc=cv2.VideoWriter_fourcc('X','V','I','D')
fourcc = cv2.cv.CV_FOURCC(*'XVID') fgbg=cv2.createBackgroundSubtractorMOG() cv2.cv.CV_FOURCC(*'XVID')
#fgbg=cv2.createBackgroundSubtractorMOG()
fgbg = cv2.BackgroundSubtractorMOG()
out=cv2.VideoWriter('Segmented_Recorded_video.avi',fourcc,20.0,(640,480))out=cv2.VideoWriter('Segmented_Recorded_video.avi',fourcc,20.0,(640,480))
while cap.isOpened():
ret, frame=cap.read() #capture frame by frame
#gray= cv2.cvtColor(frame,cv2.COLOR_BGR2GRAY)
k=cv2.waitKey(30) & 0xff
if k==27:
breakbreak
cap.release()
out.release()
cv2.destroyAllWindows()cv2.destroyAllWindows()

 3 retagged FooBar 2938 ●9 ●37 http://magazino.eu/

opencv segmentation

I am working on a project in which i need segmentated video but after apply the segmentation to the video as given in the opencv docs , the human person i m getting is not complete white. My means of say that is there is a boundary of white pixel around the person and inside part is black and the same color as background(black). Can any one help me to obtain the completely white pixeled human person ! Thanks...

My code is :

import numpy as np
import cv2

cap=cv2.VideoCapture('sample4.avi') #argument 0 represent the camera number 0 of the computer

#fourcc=cv2.VideoWriter_fourcc('X','V','I','D')
fourcc = cv2.cv.CV_FOURCC(*'XVID')
#fgbg=cv2.createBackgroundSubtractorMOG()
fgbg = cv2.BackgroundSubtractorMOG()
out=cv2.VideoWriter('Segmented_Recorded_video.avi',fourcc,20.0,(640,480))

while cap.isOpened():
ret, frame=cap.read() #capture frame by frame
#gray= cv2.cvtColor(frame,cv2.COLOR_BGR2GRAY)
k=cv2.waitKey(30) & 0xff
if k==27:
break

cap.release()
out.release()
cv2.destroyAllWindows()


opencv segmentation

I am working on a project in which i need segmentated video but after apply the segmentation to the video as given in the opencv docs , the human person i m getting is not complete white. My means of say that is there is a boundary of white pixel around the person and inside part is black and the same color as background(black). Can any one help me to obtain the completely white pixeled human person ! Thanks...

My code is :

import numpy as np
import cv2

cap=cv2.VideoCapture('sample4.avi') #argument 0 represent the camera number 0 of the computer
#fourcc=cv2.VideoWriter_fourcc('X','V','I','D')
fourcc = cv2.cv.CV_FOURCC(*'XVID')
#fgbg=cv2.createBackgroundSubtractorMOG()
fgbg = cv2.BackgroundSubtractorMOG()
out=cv2.VideoWriter('Segmented_Recorded_video.avi',fourcc,20.0,(640,480))

while cap.isOpened():
ret, frame=cap.read() #capture frame by frame