답변 있음
How to create 4D array of images
I know there are many examples of batch reading and processing files. I'm not interested in repeating those. As I'm on my lapt...

대략 3년 전 | 1

답변 있음
How to insert image in MatLab
There are a lot of views on this vague question, so maybe I should put an answer here that might be more complete. % some data ...

3년 초과 전 | 0

답변 있음
How to obtain a cutsomized colorbar at certain color value range?
You can have a nonuniform discrete colorbar, but it's a bit convoluted: https://www.mathworks.com/matlabcentral/answers/1891415...

3년 초과 전 | 0

| 수락됨

답변 있음
How to overlay a solid rectangle on the top of a image?
How the rectangle mask is generated is up to you. In these examples, I'm generating it programmatically using basic indexing. ...

3년 초과 전 | 1

| 수락됨

답변 있음
How to create a checkerboard image without using the inbuilt function?
How about using only mod(), xor(), and basic operators (colon, transpose, relational)? % parameters squaresize = [20 20]; % th...

3년 초과 전 | 1

답변 있음
Collection of Squares RGB Matrix
If you're drawing from a set of colors in a color table, then one simple way would be to just create an indexed image. CT = h...

3년 초과 전 | 0

답변 있음
Why is 'Character#' not a valid mathlab variable name?
From the documentation: "A valid variable name starts with a letter, followed by letters, digits, or underscores."

3년 초과 전 | 0

답변 있음
Display pixel colors from their known RGB values
Here's one way. load coord_pixel.mat load RGB_matrix.mat % since no geometry information is known, % i'm just going to pre...

3년 초과 전 | 0

| 수락됨

답변 있음
How best to change the colors of pixels in an image with known X (column) Y (row) coordinates?
Normally, you'd do region replacement using a mask of some sort. Image = uint8(repmat(randi(100, [9, 9]), [1, 1, 3])); Image2...

3년 초과 전 | 0

| 수락됨

답변 있음
How to draw a circle on a grey scale image and get pixel intensities inside circle and get standard deviation and mean within drawn area.
If you have IPT, this can also be done using the ROI tools either interactively or programmatically. In this example, there are...

3년 초과 전 | 1

답변 있음
Something like pipreqs in matlab
I don't know what pipreqs is, but if I understand the question, I'd start here. https://www.mathworks.com/help/matlab/matlab_...

3년 초과 전 | 1

| 수락됨

답변 있음
[DISCONTINUED] MATLAB Answers Wish-list #5 (and bug reports)
Now that moving answers/comments is possible, we kind of need these objects to have accessible timestamps with a resolution bett...

3년 초과 전 | 2

답변 있음
How to show all jpg images saved in MATLAB folder?
(Almost) straight from the docs for montage: % Create a montage from a series of JPG images in a directory targetpath = fullfi...

3년 초과 전 | 1

답변 있음
Overlay two images of different type
This was never a complicated question, even in 2015. This is concise and works for logical and numeric masks. The background c...

3년 초과 전 | 0

답변 있음
how to draw circle in an image?
As of R2018b, this can be done interactively using ROI tools: drawcircle() drawellipse(), and createMask(). Alternatively, if y...

3년 초과 전 | 0

답변 있음
I want to 3 different plot on same figure with different axis?
This is an example of two subplots using axisxx() from the link I posted earlier. % figure setup figure(1) Panel1 = uipanel...

3년 초과 전 | 1

답변 있음
I am doing a peanut colour sorting project?can anybody help me with the code.
I have this demo I made for finding bad peanuts. I hope someone finds it helpful. % read the peanut image inpict = imread('pe...

3년 초과 전 | 0

답변 있음
how to remove the cracks on image?
Why would you assume that all of the creases in the paper have a value of exactly 254? Since I can't demo anything interacti...

3년 초과 전 | 0

| 수락됨

답변 있음
Change color from red to green in plots
I don't have your data, so I'm just generating random ZData and omitting x and y data. If you only have two color classes, th...

3년 초과 전 | 0

| 수락됨

답변 있음
Tracing Line from an Image
I imagine there are better ways, but here's my hamfisted attempt: % all i have is a screenshot, so convert that to grayscale i...

3년 초과 전 | 3

| 수락됨

답변 있음
Write a function called halfsum that takes as input an at most two-dimensional matrix A and computes the sum of the elements of A that are in the diagonal or are to the right of it. example, the input is [1 2 3; 4 5 6; 7 8 9],the ans is 26
Okay, it's my turn. Let's try something absolutely ridiculous. % some test arrays A = magic(1000); % square B = [A A]; % w...

3년 초과 전 | 2

답변 있음
Find boundary pixel coordinates nearest to a line
Given the illustration and description, it's not quite clear if we're trying to draw a line to the first intersection or not. I...

3년 초과 전 | 0

답변 있음
Overlay transparent image on top of current figure
Try this: LeftPosterior = rectangle('Position',[0 0 1 1],'FaceColor',[0 .5 .5]); hold on RightPosterior = rectangle('Position...

3년 초과 전 | 0

| 수락됨

답변 있음
how to transfer output in new matrix
Here's my guess speed = [0 0 0 2 2 2 3 3 3 4 4 4 5 5 6 6 6 7 7 7 6 6 5 5 5 4 4 4 5 5 5 3 3 2 2 2 1 1 1 0 0 0]; % locations o...

3년 초과 전 | 0

답변 있음
Why does imnoise add different noise than randn?
You're seeing two things. First, your image is improperly-scaled for its class (1-256 for class 'double'), but the image you'...

3년 초과 전 | 0

| 수락됨

답변 있음
How to detect contents of a beaker in an image
Here's an initial attempt. How well this works really depends on how vague the gap between the blobs can be. As Walter mention...

3년 초과 전 | 1

답변 있음
How to add gray bands in a plot
Here's my interpretation. I'm assuming you're using datetime for the xdata, so % some fake data t1 = datetime(2013,11,1,8,0,0...

3년 초과 전 | 3

답변 있음
Choosing the centroid of an specific shape
Here. I tried to clean up the screenshot so that it's at least usable for a demo. Instead of using imadjust(), and trying to i...

3년 초과 전 | 0

| 수락됨

답변 있음
Converting a set of audio signals to images and saving them.
I don't know what st() is, but I have to assume it's a function -- possibly an STFT tool? If so, then it won't be a function an...

3년 초과 전 | 0

답변 있음
Extracting images embedded in Excel Files
If all you need is to extract images, you can do that directly. The attached xlsx file contains two embedded PNGs and a JPG. O...

3년 초과 전 | 1

더 보기