debc0119477659ebb58124a860479d61d87effe5,plantcv/rgb2gray_lab.py,,rgb2gray_lab,#Any#Any#Any#Any#,9

Before Change


    // Split HSV channels
    l, a, b = cv2.split(lab)
    device += 1
    if channel == "l":
        if debug == "print":
            print_image(l, (str(device) + "_lab_lightness.png"))
        elif debug == "plot":
            plot_image(l, cmap="gray")
        return device, l
    elif channel == "a":
        if debug == "print":
            print_image(a, (str(device) + "_lab_green-magenta.png"))
        elif debug == "plot":
            plot_image(a, cmap="gray")
        return device, a
    elif channel == "b":
        if debug == "print":
            print_image(b, (str(device) + "_lab_blue-yellow.png"))
        elif debug == "plot":
            plot_image(b, cmap="gray")
        return device, b
    else:
        fatal_error("Channel " + str(channel) + " is not l, a or b!")

After Change


    // Split LAB channels
    l, a, b = cv2.split(lab)
    // Create a channel dictionaries for lookups by a channel name index
    channels = {"l": l, "a": a, "b": b}

    if debug == "print":
        print_image(channels[channel], str(device) + "_lab_" + names[channel] + ".png")
    elif debug == "plot":
        plot_image(channels[channel], cmap="gray")

    return device, channels[channel]
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 14

Instances


Project Name: danforthcenter/plantcv
Commit Name: debc0119477659ebb58124a860479d61d87effe5
Time: 2017-04-18
Author: noahfahlgren@gmail.com
File Name: plantcv/rgb2gray_lab.py
Class Name:
Method Name: rgb2gray_lab


Project Name: danforthcenter/plantcv
Commit Name: dfecea486703d727905657b2dce890664dd1ba72
Time: 2017-04-18
Author: noahfahlgren@gmail.com
File Name: plantcv/rgb2gray_hsv.py
Class Name:
Method Name: rgb2gray_hsv


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