A method for demosaicing an image (194, 202) captured by an image sensor (132, 200) having an arrayed plurality of sensor pixels each located at a respective one of a plurality of array-coordinates, the plurality of sensor pixels including at a first sub-plurality of array-coordinates, a first sub-plurality of sensor pixels each filtered by a respective first color filter, at a second sub-plurality of array-coordinates, a second sub-plurality of sensor pixels filtered by a respective second color filter, and at a third sub-plurality of array-coordinates, a third sub-plurality of sensor pixels filtered by a respective third color filter, the method comprising: computing, for each of a first plurality of interpolated pixel-values and based on neighboring primary pixel-values, a respective one of a plurality of first confidence values each corresponding to an array-coordinate of either the second or the third sub-plurality of array-coordinates, the first plurality of interpolated pixel-values being interpolated from neighboring primary pixel-values, of a first plurality of primary pixel-values, generated by the first sub-plurality of sensor pixels; generating a first thresholded mapping from a first coordinate mapping by removing each interpolated pixel-value, and array-coordinate mapped thereto, having a first confidence value less than a threshold value, the first coordinate mapping including each of the second and the third sub-plurality of array-coordinates mapped to a respective one of a first plurality of interpolated pixel-values; repeating the steps of computing and generating for the second sub-plurality of sensor pixels to yield a second thresholded mapping; repeating the steps of computing and generating for the third sub-plurality of sensor pixels to yield a third thresholded mapping; determining a plurality of high-confidence array-coordinates as array-coordinates, of the plurality of array-coordinates, included in each of the first, second, and third thresholded mappings, remaining array-coordinates being a plurality of low-confidence array-coordinates; forming a refined image (338, 1100) that includes, at each of the plurality of high-confidence array-coordinates, a respective pixel-value-triplet including one primary pixel-value and two interpolated pixel-values; and filling the refined image by assigning, for each of the plurality of low-confidence array-coordinates, a pixel-value based on pixel-values of neighboring high-confidence array-coordinates. computing, for each of a first plurality of interpolated pixel-values and based on neighboring primary pixel-values, a respective one of a plurality of first confidence values each corresponding to an array-coordinate of either the second or the third sub-plurality of array-coordinates, the first plurality of interpolated pixel-values being interpolated from neighboring primary pixel-values, of a first plurality of primary pixel-values, generated by the first sub-plurality of sensor pixels; generating a first thresholded mapping from a first coordinate mapping by removing each interpolated pixel-value, and array-coordinate mapped thereto, having a first confidence value less than a threshold value, the first coordinate mapping including each of the second and the third sub-plurality of array-coordinates mapped to a respective one of a first plurality of interpolated pixel-values; repeating the steps of computing and generating for the second sub-plurality of sensor pixels to yield a second thresholded mapping; repeating the steps of computing and generating for the third sub-plurality of sensor pixels to yield a third thresholded mapping; determining a plurality of high-confidence array-coordinates as array-coordinates, of the plurality of array-coordinates, included in each of the first, second, and third thresholded mappings, remaining array-coordinates being a plurality of low-confidence array-coordinates; forming a refined image (338, 1100) that includes, at each of the plurality of high-confidence array-coordinates, a respective pixel-value-triplet including one primary pixel-value and two interpolated pixel-values; and filling the refined image by assigning, for each of the plurality of low-confidence array-coordinates, a pixel-value based on pixel-values of neighboring high-confidence array-coordinates.