a99de822ad4c2b57061192e1e78a7e49f7ebc1dc,plantcv/plantcv/apply_mask.py,,apply_mask,#,11

Before Change


        white_masked = cv2.add(masked_img, white_mask)
        if params.debug == "print":
            print_image(white_masked, os.path.join(params.debug_outdir, str(params.device) + "_wmasked.png"))
        elif params.debug == "plot":
            plot_image(white_masked)
        return white_masked
    elif mask_color.upper() == "BLACK":

After Change


    else:
        fatal_error("Mask Color " + str(mask_color) + " is not "white" or "black"!")

    array_data = rgb_img.copy()

    // Mask the array
    array_data[np.where(mask == 0)] = color_val

    // Check if the array data is
    if params.debug == "print":
        print_image(array_data, os.path.join(params.debug_outdir, str(params.device) + "_masked.png"))
    elif params.debug == "plot":
        plot_image(array_data)

    return array_data
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: danforthcenter/plantcv
Commit Name: a99de822ad4c2b57061192e1e78a7e49f7ebc1dc
Time: 2019-09-30
Author: haleyschuhl@gmail.com
File Name: plantcv/plantcv/apply_mask.py
Class Name:
Method Name: apply_mask


Project Name: scikit-learn/scikit-learn
Commit Name: c50597926f69286fce5c416d23271a302b2da962
Time: 2020-08-31
Author: devilincarcerated020@yahoo.com
File Name: sklearn/utils/_mask.py
Class Name:
Method Name: _get_mask


Project Name: ina-foss/inaSpeechSegmenter
Commit Name: 4396573e860d553825702006aa335989356b45c8
Time: 2020-05-10
Author: ddoukhan@ina.fr
File Name: inaSpeechSegmenter/segmenter.py
Class Name: Segmenter
Method Name: batch_process