The underlying melody can be read from the top notes: (E, F, E, D, E). The chords are accentuating the melody.
The first chord is a Cmaj7 in root ascending position at the bass with the E removed; the E appears in a root ascending Emin triad at the treble with an E to top off the treble octave. (Mini-question: is there specific terminology for when we 'double' up the root note in a chord an octave above/below? For example, in a Cmaj 2nd inversion, if I add a G5 to the triad G4,C5,E5, what would I call it?)
The second chord is an Fmin, with the triad appearing at the treble and the octave F being part of the melody line; Fmin 2nd inversion is at the bass.
How do these two chords fit in? The progression certainly isn't from any diatonic: a maj7 only appears on the root or 4th degree; a fourth from the former is the 4th degree, which harmonizes to a major (seventh) chord, and a fourth from the latter is not in scale (landing between the 6th and 7th degree). In the harmonic major scale, only the 4th degree has a maj7, and again, a fourth from it is not in scale. I believe the difficulty boils down to consolidating chromatic minor thirds (G-B from Cmaj7 and G#-C from Fmin). However, the progression is reminiscent of many classical pieces and sounds pretty standard, so I see no reason to look at more exotic scales. What is at play here? Surely the G# in the second chord is not just an unanalyzable accidental?