Fixed black and white conversion
Add function find diameter object