First Min Operation of input Image J