improving filter out small objects in getTargetHeight