特定rgb像素的位置

时间:2016-11-11 09:56:19

标签: python-3.x opencv

我很难找到图像中某些RGB值的(x,y)坐标。让我说我编辑一个图像并放置一个像素(0,255,5),我怎样才能找到2D坐标?

我目前的做法是使用 package Exercise2501; import java.util.Scanner; public class Friends { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); System.out.println("How many names do you want to enter?"); int number = scanner.nextInt(); for (int i = 0; i < number; i++) { System.out.println("Type a few names. "); String names = scanner.nextLine(); } String names = scanner.nextLine(); System.out.println(names); } } ,但它似乎无法运作。我知道opencv在BGR中存储图像。我并不真的想要使用HSV方法和numpy.where,因为我只想要非常具体值的单个像素,因此这样会有点过分。

inRange

0 个答案:

没有答案
相关问题