dfecea486703d727905657b2dce890664dd1ba72,plantcv/rgb2gray_hsv.py,,rgb2gray_hsv,#Any#Any#Any#Any#,9

Before Change


    // Split HSV channels
    h, s, v = cv2.split(hsv)
    device += 1
    if channel == "h":
        if debug == "print":
            print_image(h, (str(device) + "_hsv_hue.png"))
        elif debug == "plot":
            plot_image(h, cmap="gray")
        return device, h
    elif channel == "s":
        if debug == "print":
            print_image(s, (str(device) + "_hsv_saturation.png"))
        elif debug == "plot":
            plot_image(s, cmap="gray")
        return device, s
    elif channel == "v":
        if debug == "print":
            print_image(v, (str(device) + "_hsv_value.png"))
        elif debug == "plot":
            plot_image(v, cmap="gray")
        return device, v
    else:
        fatal_error("Channel " + (str(channel) + " is not h, s or v!"))

After Change



    // The allowable channel inputs are h, s or v
    names = {"h": "hue", "s": "saturation", "v": "value"}
    if channel not in names:
        fatal_error("Channel " + str(channel) + " is not h, s or v!")

    // Convert the input BGR image to HSV colorspace
    hsv = cv2.cvtColor(img, cv2.COLOR_BGR2HSV)
    // Split HSV channels
    h, s, v = cv2.split(hsv)
    // Create a channel dictionaries for lookups by a channel name index
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 11

Instances


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


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