
DGM
Hi, I'm nobody. I don't belong here, but I have nothing better to do. Matlab used to be part of my work. Now it's part of my hobbies. That's pretty sad, really. -- I don't reply to email anymore. If you have a question about my questionable FEX submissions, leave a comment on the FEX page and I'll get the notification. Alternatively, ask a question on the forum and @DGM me so I'll get notified.
Statistics
Content Feed
How can I draw ovals with insertshape?
According to the documentation for insertShape(), there is no such option for an oval, although I suppose you could consider a c...
약 12시간 전 | 1
how can i apply an oval mask to extract face region?
Oh well if you want an oval, you're in luck. This is one way to generate oval masks. inpict = imread('peppers.png'); [rows,...
약 14시간 전 | 0
How to automatically input function arguments?
Assuming that allcomb() takes a variable-length argument list, this is one way. % inputs n = 2; a = [1 2]; b = [3 4]; % c...
3일 전 | 0
| 수락됨
count the number a letter appears in a string and plot a histogram
I'm sure there are text analysis tools for this, but here's one basic way. categories = 'ACGT'; % generate a test string ...
3일 전 | 0
How to generate sinusoidal color fringes in MATLAB??
It's not clear to me how these are sinusoidal or even periodic. You can simply create an image like the one shown, but if yo...
4일 전 | 1
| 수락됨
Matlab editor is not working
This seems to be common enough that other people have been bringing it up since last year. You can see if any of these threads ...
5일 전 | 0
| 수락됨
searching for a line of pixels in an image
There are FEX submissions that are meant for this, but I have my opinions. This is my advice and an example of the basic appr...
6일 전 | 1
how do i assign a color to the same type of shape
It's no surprise OP got lost. That's an awful lot of duplicated code, unused code, and misleading variable names. I got lost. ...
7일 전 | 0
Background color correction of a rgb picture
This looks more like a slightly off-normal camera position and a reflective surface. Either way, you don't operate on the fal...
7일 전 | 0
Create a binary edge image of Malards.jpg using only the red channel of the image. Obtain the binary image with all edges that are stronger than 50 using Roberts edge detecti
The output of edge() is already a binary image (class 'logical'). There's no need to use imbinarize() on it.
8일 전 | 0
Change Hair Color and apply the one picked by user
I didn't think about using histogram matching for that. MIMT imrecolor() was never made for this sort of thing, but I've been d...
9일 전 | 0
how to change rgb to [ Hue1, Hue2, Sat1, Sat2, Val1, Val2 ]
The question is either incomplete or malformed; I can't tell which. You're asking how to change an RGB image to a range of HSV ...
10일 전 | 0
I want to code an image stabilizer but when I try to copy an RGB image to a m*n*3 zeros matrix and display it I get a weird result.
Since the expected scale of image data depends on the class of the array, you need to make sure that the array is the appropriat...
10일 전 | 0
| 수락됨
Error IMBLEND: unsupported class for FG?
I guess the @ notification didn't work here. For passers-by, I'm pretty sure this problem had been caused by a missing file. ...
12일 전 | 0
Changing Background Color of a JPG to Black (RGB)
I don't know that this actually answers the original need, but it's comfortably too late for any of that to matter. Without kno...
12일 전 | 0
Replicate a colormap in MATLAB
I am not even remotely familiar with POV-ray, so I have no expecations or any way to verify this. That said, this is what it lo...
13일 전 | 1
How to remove distortions from an image which is imported in MATLAB as a matrix of pixel values (as a file.MAT)?
Alternatively, if you don't have CVT, and you're not processing many images, you could use fitgeotrans() and imwarp(). This i...
14일 전 | 0
Using colormap to graph function of three variables
Depending on what things look like, you might be able to get away with a colormapped scatter plot. That said, I think it's diff...
15일 전 | 0
Create random parallel black lines in a white box until tis filled
The lines you're drawing are 2px wide, so the inner loop will never be satisfied once the only remaining stripes are 1px wide. ...
15일 전 | 0
| 수락됨
How can I produce such an image?
When given a single-channel intensity image, imagesc() will render it in pseudocolor using the current axes colormap. Unless th...
17일 전 | 1
Open figure in editor instead of in new window
If you're asking how to programmatically dock the figure, you can set its 'windowstyle' property. In order to create a new empt...
19일 전 | 0
Can i get 12 different colors for 12 different variables in matlab? So far I could only get 6 colors because i don't know the values for the other colors:
I'm not really sure what you're asking for or why. The thing you have is a set of repeated pairs. The thing you're asking for ...
20일 전 | 1
| 수락됨
Determining orientation of grains based on EBSD color map
I only ever did enough crystallography studies that I could answer a few leftfield questions on an interdisciplinary exam. I ha...
22일 전 | 1
How to code this pixel art in matlab?
This is a good use for indexed color. % define the colors you want to use % these colors should be unit-scale (scaled WRT [0...
23일 전 | 0
I would like to plot several histograms in 3D using Matlab like in the below figure. Does anyone have any suggestions?
I could have sworn I'd posted an answer to a similar problem, but maybe I'm dreaming. Here's one way of doing it with bar3(). ...
23일 전 | 0
How to use bar() function in MATLAB to display histogram count as a bar graph?
Is there a particular reason we're avoiding imhist()? inpict = imread('cameraman.tif'); % you could use histcounts() and bar...
23일 전 | 0
Is there any plot function that perform a plan view of bar3?
This sounds like a use for imagesc(). While surf()/pcolor() associate the data values with the vertices, image()/imagesc() asso...
24일 전 | 0
How to collage images in a folder
That really depends on what "collage" means, but I'm going to guess that this answer is a good place for any passing readers to ...
25일 전 | 0
How to combine desired cropped image to another image?
Here's a start. In this example, the white region in the FG image is removed using a very crude one-sided S threshold. This ...
26일 전 | 0
Share your favorite snippet or utility
For some reason, I can never remember the name of the lookfor() function, and looking for the lookfor() function is a pain when ...
26일 전 | 0