"Tricky" collage between 3D and 2D picture. To understand what "tricky" means you need to see the question.

2 Ansichten (letzte 30 Tage)
Hi people.
I want to collage between 3D picture and 2D "like" picture. I want this 2D picture just follow the 3D picture in particular position. Hard to explain, easy to show. Take a look:
You see: I have 3d topography picture and I want just to fit 2D picture just follow the topography of the 3D picture.
Here attached 2 intensity matrices of topography and some signal (Raman signal). I want to make 3D picture of topography and put raman signal picture on top of this topography picture like in the sample above. I want to put this raman signal picure on the top of topography picture in x(columns)-(2:252) and y(rows)-(6:246) on the top of topography picture. The topography picture size is 256X256 pixels. I want to put the raman signal picture (241X251) a little bit shifted corresponding to the topography picture.
Of course I need to play with the transparency of the raman signal picture but I think I know how to do it (with alphadata). But let us first try to solve the first task.
Thank you very much.
P.S. Just to clarify. The first picture is the 3D topography with the another picture on top of it. This is actually what I want to get.
  1 Kommentar
Dimani4
Dimani4 am 1 Mär. 2023
Bearbeitet: Dimani4 am 1 Mär. 2023
Anyone can help me? I just tried with imfuse, with surf when I insert in the place of my raman picture the colors like
asd=topography_picture.CData; % topography data
asd(points{1}(1):points{3}(1),points{1}(2):points{2}(2))=raman_interpC;% inserting the raman picture signal
surf(xx,yy,topography_picture.CData,asd);%surf(X,Y,Z,C) additionally specifies the surface color.
I liked the case with surf but it's not exactly what I want and one more thing I dont know how to control the alphadata only the raman signal picture. It's cover the area of the topography in the place of the raman picture but I barely see the intensity of the raman signal.
See what I have after
surf(xx,yy,topography_picture.CData,asd)
This what I wanted but I dont see the intensity of the raman signal, only the boundaries which it covers the surface of the topography signal.
I wonder why in matlab there is no such a function. This is very useful thing in image processing.
I will be very grateful if you can help me.
P.S.
See below only raman signal:
And here is only topography image:
Thank you.

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Dimani4
Dimani4 am 2 Mär. 2023
Ok. I did solve it with clamsy way but for now is good enough for me. I'll keep search for the better way maybe later.
So what I do is create NaN array for the size of the topography picture:
asd=NaN(size(topography_picture.CData)); % create nan array for topography image
asd(points{1}(1):points{3}(1),points{1}(2):points{2}(2))=raman_interpC;% insering matrix of raman signal in the place where it took place relatively to topography
Raman_image3D=surf(xx,yy,topography_picture.CData,asd);% and then insert in Color this matrix in surf with topography picture

Kategorien

Mehr zu Polar Plots finden Sie in Help Center und File Exchange

Produkte


Version

R2016b

Community Treasure Hunt

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

Start Hunting!

Translated by