查找RGB图像中的剪切像素

时间:2016-08-22 12:55:28

标签: python image tkinter python-imaging-library clipped

我有一个image image.png,我想找到所有剪裁的像素。以下是我到目前为止的情况:

$(function () {
$('#container').highcharts({
    chart: {
        type: 'column'
    },
    title: {
        text: 'Stacked column chart'
    },
    xAxis: {
        categories: ['Apples', 'Oranges', 'Pears', 'Grapes', 'Bananas']
    },
    yAxis: {

        min: 0,
        title: {
            text: 'Total fruit consumption'
        },
        stackLabels: {
            enabled: true,
            style: {
                fontWeight: 'bold',
                color: (Highcharts.theme && Highcharts.theme.textColor) || 'gray'
            }
        }
    },
    legend: {
        align: 'right',
        x: -30,
        verticalAlign: 'top',
        y: 25,
        floating: true,
        backgroundColor: (Highcharts.theme && Highcharts.theme.background2) || 'white',
        borderColor: '#CCC',
        borderWidth: 1,
        shadow: false
    },
    tooltip: {
        headerFormat: '<b>{point.x}</b><br/>',
        pointFormat: '{series.name}: {point.y}<br/>Total: {point.stackTotal}'
    },
    plotOptions: {
        column: {
            stacking: 'normal',
            dataLabels: {
                enabled: true,
                color: (Highcharts.theme && Highcharts.theme.dataLabelsColor) || 'white',
                style: {
                    textShadow: '0 0 3px black'
                }
            },
    minPointLength: 5
        }
    },
    series: [{
        name: 'John',
        data: [7000, 5, 1, 1, 2]
    }, {
        name: 'Jane',
        data: [2000, 10, 1, 1, 2]
    }, {
        name: 'Joe',
        data: [5, 1, 1, 1, 2]
    }]
});
});

我使用Python,Tkinter,Pil。

由于

1 个答案:

答案 0 :(得分:0)

如果被剪辑&#39;你的意思是饱和,那么你可能想要根据像素的强度创建一个阈值。有几个方程试图确定这一点,但我会推荐Grayscale equations之一。看看ATSC中使用的等式:

I=.2126*r+.7152*g+.0722*b

然后只计算出你考虑过的那些价值范围&#39;剪裁&#39;。

相关问题