Learning imaging mechanism directly from optical microscopy observations