LInkedIn Post and Working with Images

Open
#192 0 comments 6 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
20/100
Issue type
Documentation
Clarity
Needs clarification
Activity status
Stale
Tech stack
matlab
Domain
content

Research direction

The issue provides MATLAB code for merging two images and links to a LinkedIn post, but names no repository file, test, or requested change. First read the repository’s contribution guidance and nearby image examples to determine whether this is intended as a content contribution; done would need a clear request for how the example should be added.

Written by the indexing model from the issue text.

Description

https://www.linkedin.com/posts/marco-riani-06762119_as-part-of-the-masters-degree-in-data-science-share-7457796491131166720-Mfrh?utm_source=share&utm_medium=member_desktop&rcm=ACoAAAPUQQ8BDgeTCLhzRANTEEizGfwyjkIa4RY

For those are insterested in the code to merge two images please have a look at the code below

% Read images
BackGroundImage = imread('group.jpeg');        
raspberryOriginal = imread('raspberry.png'); 

% Resize raspberryOriginal (using scale parameter)
scale=0.30; 
newWidth =round(size(BackGroundImage,2)*scale);
% Create small image
raspberrySmall=imresize(raspberryOriginal, [NaN newWidth]);

% Get dimensions of the two images
[bgH, bgW, ~]=size(BackGroundImage);
[ovH, ovW, ~]=size(raspberrySmall);

% Position: bottom-right with margin
margin=20;
xStart=bgW-ovW-margin;
yStart=bgH-ovH-margin;

% Create output image
output=BackGroundImage;

% Rows and columns of matrix output are replaced with Raspberry Pi image
% Play with yStart and xStart
output(yStart:yStart+ovH-1,xStart:xStart+ovW-1,:)=raspberrySmall;

imwrite(output,'DSMimage.png');
imshow(output);

The two original images are attached

Image Image

We must be the best. No other result is possible!

Dominant language
MATLAB
Stars
30
Forks
1
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from UniprJRC/DSwithMATLAB

All issues in UniprJRC/DSwithMATLAB

Similar issues

More MATLAB issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.