Basically I wanted to perform image analysis on a a hair switch and I was able to seperate the image from the background as follows:
If you look at the last image, all I want to do is basically cut off the top and bottom parts of the image because they are blurry. This can be a standard way of doing it that does the same crop for every picture I process because they will always be taken the same way.
The original pictures are here:
My code to get souly the hair is as follow (thank you image analyst for providing me with most of this):