image - Remove background and get deer as a fore ground? -
i want remove background , deer foreground image.
this source image captured trail camera:
this want get. output image can binary image or rgb.
i worked on , seek many methods solution every time failed @ specific point. please first understand exact problem.
image captured trail photographic camera , photographic camera motion detector. when deer come in front end of photographic camera capture image. scene mode alter respect weather changing or day , night etc. can't utilize frame difference or thing this. segmentation may not work correctly because foreground (deer) , background have same color in many cases.if still have ambiguity in question please first inquire me clear , answer, appreciated. in advance.
here's do:
as commented question, can observe dear , perform grabcut segment picture.
to observe dear, couple classifier sliding window approach. mean you'll have classifier given patch (can big patch) in image, output's score of how much patch similar dear. sliding window approach means loop on window size , loop on window location. each position of window in image, should apply classifier on window , score of how much window "looks like" dear. 1 time you've done that, threshold scores "best windows", i.e. windows similar dear. rational behind if dear nowadays @ location in image, classifier output high score @ windows close/overlap actual dear location. merge locations single location. can done applying functions grouprectangles opencv:
http://docs.opencv.org/modules/objdetect/doc/cascade_classification.html#grouprectangles
take @ face detection illustration opencv, same (sliding window + classifier) classifier haar cascade.
now, didn't mention "dear classifier" can be. can utilize hog+svm (which both included in opencv) or utilize much powerful approach of running deep convulutional neural network (deep cnn). luckily, don't need train deep cnn. can utilize next packages "off shelf" imagenet networks (which powerful , might able identify dear without farther training):
decaf- can used research purposes: https://github.com/ucb-icsi-vision-group/decaf-release/
or caffe - bsd licensed:
http://caffe.berkeleyvision.org/
there other packages of can read here: http://deeplearning.net/software_links/
the mutual ones theano, cuda convnet's , overfeat (but that's sentiment based, should chose best bundle list linked to).
the "off shelf" imagenet network trained on 10m images 1000 categories. if categories contain "dear", can utilize them is. if not, can utilize them extract features (as 4096 dimensional vector in case of decaf) , train classifier on positive , negative images build "dear classifier".
now, 1 time detected dear, meaning have bounding box around it, can apply grabcut:
http://docs.opencv.org/trunk/doc/py_tutorials/py_imgproc/py_grabcut/py_grabcut.html
you'll need initial scribble on dear perform grabcu. can take horizontal line in middle of bounding box , hope on dear's torso. more elaborate approaches find symmetry axis of dear , utilize scribble, have google, research implement method extract symmetry axis image.
that's it. not straightforward, problem.
please allow me know if have questions.
image matlab opencv image-processing computer-vision
No comments:
Post a Comment