MATLAB Answers

How can use [c r p]=impixel('img1.png'); turn to an knowing [c r] to impixel image

1 ビュー (過去 30 日間)
HUANG YU-CHE 2020 年 9 月 24 日
コメント済み: HUANG YU-CHE 2020 年 9 月 29 日
[c r p]=impixel(firstimage);
There is my question:
I can use the code above so for the first image I can get a value to impixel,
and now I want to use the same range,to do to the other,different case but same place,
so what I think is to get the first image [c r] value so I can write like this
impixel(firstimage c r)
so I can get the some range about it
but I have no idea how to get c value,because c is a double(matrix.....I think)
please help me about it,thanks

  0 件のコメント



Anshika Chaurasia
Anshika Chaurasia 2020 年 9 月 29 日
Hi Huang,
firstimage=imread('img1.png'); %Line 1
[c r p]=impixel(firstimage); %Line 2
It is my understanding that you want to get the c and r values of firstimage and apply impixel on other image (or firstimage) for same (x, y) coordinates i.e., c and r values.
secondimage = impixel(other_image,c,r); %Line 3
In line 2, you will get numeric vectors c and r that can be used as (x,y) coordinates in other image. So, line 3 will return pixel values for the other image for same (x, y) coordinates as used in firstimage.

  1 件のコメント

HUANG YU-CHE 2020 年 9 月 29 日
wow,yes that what I want,thanks for you very much


その他の回答 (0 件)



Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by