Currently this method is utilizing Standard deviation which is not good in this instance. Ex.  This image shows that the STD function removes the outermost points but there are still 1px borders between the tiles and the traps.