이 질문을 팔로우합니다.
- 팔로우하는 게시물 피드에서 업데이트를 확인할 수 있습니다.
- 정보 수신 기본 설정에 따라 이메일을 받을 수 있습니다.
how to make a slice of multiple images in 3d
조회 수: 7 (최근 30일)
이전 댓글 표시
I have these three images meterology. First image is weather chat of 100m, second is of 200m, thrid is of 300m.
I have these three images meteorology. First image is weather chat of 100m, second is of 200m, third is of 300m
This is roughly prototype of my idea what i want
Both longitude and latitude are same in three images, I want to just makes longitude as x - axis, latitude as y axis and 100m image at 100, 200m image at 200 ....
i able to producce this code,
a=imread('100.jpg');
b=imread('200.jpg');
c=imread('300.jpg');
I = cat(4,a,b,c);
data = importdata('gpheight300.txt') ;
x = data(:,1) ; x = unique(x) ;
y = data(:,2) ; y = unique(y) ;
%# coordinates
[X,Y] = meshgrid(1:size(I,2), 1:size(I,1));
%[X,Y]=meshgrid(x,y);
Z = ones(size(I,1),size(I,2));
kin=[100 200 300];
for k=1:length(kin)
surface('XData',X, 'YData',Y, 'ZData',Z.*kin(k), ...
'CData',I(:,:,k), 'CDataMapping','direct', ...
'EdgeColor','none', 'FaceColor', 'texturemap')
% patch('XData',X, 'YData',Y, 'ZData',Z.*kin(k),'CData',I(:,:,k))
end
%colormap(cmap)
view(3), box on, %axis tight square
%set(gca, 'YDir','reverse', 'ZLim',[0 size(I,3)+1])
saveas(gcf,'3d','jpg');
This code producing surface in which all three images becomes brown color,(wrapped) when i save them just is this blank 3d block save appear.
Can some one tell me how i can do this 3d slicing of images?
댓글 수: 8
Walter Roberson
2016년 6월 25일
What difference is there between this question and your previous question on this topic, which you have now deleted?
Muhammad Usman Saleem
2016년 6월 26일
please some body guide me about how can i resolve this problem? I do not know why people do not share their knowledg, Always a good learner is who have the time instant solution and sharing of knowledge with other. Any help will be appricible.
Walter Roberson
2016년 6월 27일
Sometimes people are distracted. Or ill. Or just not interested in the topic. Or do not understand the question. Or do not feel that they have anything to contribute to the question. Or are in a bad mood. Or feel like the poster had not put in enough effort. Or have other things to do on a weekend. Or feel like the question is "too big" for the attention they feel up to paying.
Muhammad Usman Saleem
2016년 6월 27일
편집: Muhammad Usman Saleem
2016년 6월 27일
Knowledge always learn after sharing with other...
Its lame excuses to not assist =D
knowledge is the only thing which can not be steal but always increase after sharing..
Walter Roberson
2016년 6월 27일
We are volunteers. We don't need excuses. If we do not feel like contributing, we don't have to contribute. If it isn't fun for us, then we can turn our attention elsewhere and you have no grounds for grumbling.
For example I have many months worth of home repairs that should be done, including items that the city inspectors would probably order me to fix immediately if they ever happened to come by. If you are implying that I "owe" my volunteering to you or anyone, then why do I not see you at my home fixing my roof for free?
Walter Roberson
2016년 6월 30일
Muhammad Usman Saleem comments, in response to my "We are volunteers" post:
some body guide these seniors voluntars , try to resolve this questions, instead of giving personal views and irrelevant posting on this question. I shall be very thankful for this kind favor.
Walter Roberson
2016년 6월 30일
Muhammad, if Mathworks ever instituted a policy that the volunteers were not permitted to give personal views, then I would stop volunteering immediately; perhaps I would go back to the Usenet Group, which would certainly not have such a restriction.
답변 (1개)
Image Analyst
2016년 6월 26일
Try using "hold on" in your loop.
댓글 수: 17
Muhammad Usman Saleem
2016년 6월 26일
편집: Muhammad Usman Saleem
2016년 6월 26일
thanks for you reply. No actually there is problem in surf function. All images after setting in vertical ways becomes brown in color. I try holding on after for loop before surf but results remains as usually wrong.
I use
saveas(gcf,'3d','jpg');
to save this space. But it save a black 3 d block instead of this image(check it and how my original images has becomes brown)
Muhammad Usman Saleem
2016년 6월 26일
problem is in why i am creating surface? Here i only need to hand up 100m image to it z-axis....
Image Analyst
2016년 6월 26일
What is a "100m image"? I don't know what "need to hand up 100m image to it z-axis" means. What do you mean by hand? Like "hand over" as in to deliver something??? How do you do that to a z axis?
Muhammad Usman Saleem
2016년 6월 27일
편집: Muhammad Usman Saleem
2016년 6월 27일
Sorry for inconvient language. It is actually hang over
I have three image(weather chats) which represent atmospheric condition on different elevations. First image for 100 m elevation , second is 200 m elevation and thrid is for 300 m elevation(if you understand let's move ahead).
I want to present these images in 3d space. Such that x axis of this 3d space becomes lon( see x-axis of these images) , y axis of the 3d space becomes lat( see y axis of images) and z axis becomes elevation like 100m, 200m, 300m.
And the image of 100m elevation hang up( as I want) horizontally along z-axis. When value of 200 comes on z axis then image of 200m elevation hang on this place....
Another problem is that using surf function all images background becomes brown..(it changing all image which I do not want) Hope you got my problem
Thank you
Image Analyst
2016년 6월 27일
It's brown because you're probably using imagesc() instead of imshow(), and you have gray scale image. imagesc() assumes the image is indexed instead of grayscale and applies some funky colormap for some reason. Don't use imagesc(). I never do. Only use imshow().
Muhammad Usman Saleem
2016년 6월 27일
I have again checked my code, i do not use imagesc() or imshow() function. I am just creating mesh of 1s and mesh of 0s. Then using them in surf function to hang them in horizontal plane. Image are you got my query? or not
Image Analyst
2016년 6월 28일
I tried to run it but you forgot to attach 'gpheight300.txt' so it errored out. If you want use to try your code you'll have to give us all the data that is needed and tell us what special toolboxes might be needed.
Muhammad Usman Saleem
2016년 6월 28일
Thanks for your reply ...
Please find three attachment which are the data source of these three images.
In each zip file you find 4 text files.
Temperature which i have shown in color map in my above images, contours of gp_height are on this color maps. Quever plot is make for winds (u,v text files) , shown in arrow in my images.
Muhammad Usman Saleem
2016년 6월 28일
편집: Muhammad Usman Saleem
2016년 6월 28일
i am using matlab (2013) image proccessing tool box as tool for these images.
Image Analyst
2016년 6월 29일
I just haven't had the time to devote to you. Vacations, plus backlog at work, etc.
Muhammad Usman Saleem
2016년 6월 30일
Image analyst try to use delete option to remove irrelevant answer for this question. So that no matlab user get misguide by your answer( as it is not perfect and relevant answer to problem).. Matlab answer always need some good answer. I am also volentar my times on this form. Deletion of your irrelevant answer gives a chance for experts to communicate on specific problem!
Walter Roberson
2016년 6월 30일
Image Analyst has not made any irrelevant answers to this question. His replies have reflected the available information at the time.
This site is not just about Questions and final solutions: the parts that show how the solution was arrived at can be as important. Imagine, for example, a book that had a list of integrals and a list of their solutions: such a book has some use as reference tables, but more important to most people is a book that shows the key steps needed to arrive at the solution to the integrals.
Image Analyst
2016년 6월 30일
I really don't know what you want. You're taking individual color channels and then apparently trying to display them as surfaces with some colormap for some reason. Perhaps you should look at this: http://www.mathworks.com/matlabcentral/fileexchange/29485-meshcanopy
Walter Roberson
2016년 6월 30일
Muhammad Usman Saleem comments on my response, above:
some body guide these seniors voluntars , try to resolve this questions, instead of giving personal views and irrelevant posting on this question. I shall be very thankful for this kind favor.
Muhammad Usman Saleem
2016년 7월 1일
편집: Muhammad Usman Saleem
2016년 7월 1일
i got this code example from google, where author use index map instead of rgb image then use surf function. Which i really do not know why? What function can we use with rgb?
the link is not of my use, bz i am not using gray scale image
Walter Roberson
2016년 7월 13일
Muhammad Usman Saleem comments to Image Analyst's response of 30 Jun 2016
not of the solution to this problem
참고 항목
카테고리
Help Center 및 File Exchange에서 Red에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!오류 발생
페이지가 변경되었기 때문에 동작을 완료할 수 없습니다. 업데이트된 상태를 보려면 페이지를 다시 불러오십시오.
웹사이트 선택
번역된 콘텐츠를 보고 지역별 이벤트와 혜택을 살펴보려면 웹사이트를 선택하십시오. 현재 계신 지역에 따라 다음 웹사이트를 권장합니다:
또한 다음 목록에서 웹사이트를 선택하실 수도 있습니다.
사이트 성능 최적화 방법
최고의 사이트 성능을 위해 중국 사이트(중국어 또는 영어)를 선택하십시오. 현재 계신 지역에서는 다른 국가의 MathWorks 사이트 방문이 최적화되지 않았습니다.
미주
- América Latina (Español)
- Canada (English)
- United States (English)
유럽
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
아시아 태평양
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)