Plotting Raw pixels?
9 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Is it possible to plot raw pixels on computer screen using MATLAB?? I have to do a project for computer Graphics using various algorithms such as DDA, Bresenham etc for drawing shapes, animation etc. I thought MATLAB would be the best platform for this as the project requires many matrix operations. SO, I need to know if I could plot pixels in computer screen like i can in various libraries of C, C++???? Please Help ....
0 Kommentare
Antworten (2)
Walter Roberson
am 11 Dez. 2011
Sorry, there is no mechanism for this.
You can create an axis, set it invisible, put an image() object in the axes with size arranged to be 1:1 mapping on pixels. Then in the image object, keep updating the CData and AlphaData properties, with the AlphaData set to 0 in any location you have not "painted" and 1 in any location that you have "painted", and the CData set to anything in the locations you have not "painted" and set to the appropriate pixel values for the locations that you have "painted".
You will need to decide how you want to handle callbacks: for example, if a location is not painted, do you want to pass clicks on to the location "underneath", but if the location is painted, you want the click to be intercepted? Now, what about mouse-overs ? And do you want this covering the whole screen but without any obvious figure, with people able to open and close and resize the figures "underneath" the "raw pixels" ?
0 Kommentare
Jan
am 11 Dez. 2011
What is a "raw" pixel?
You cannot access pixels on the monitor directly in Matlab. But you can display a matrix as image. So all actions, which can be applied to elements on a matrix can be displayed as graphics in a figure ("window"). I assume, you can solve your project in Matlab.
0 Kommentare
Siehe auch
Kategorien
Mehr zu Graphics Objects finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!