Here is a nice link to web application that lets you remove the unwanted background. Just head over to the side, follow the simple instructions of marking the background and the subject and you are done.
Create index using command omindex
and then you can use quest or search.py to search or you can setup the cgi way so that you can use local browser to search.
You can setup cron with following to update the index regularly: