Skip to content

Instantly share code, notes, and snippets.

View Aroueterra's full-sized avatar
⚔️
Typing slowly

Avan Aroueterra Aroueterra

⚔️
Typing slowly
  • Gensokyo
View GitHub Profile
package practice;
//add class definitions below this line
class SodaMachine {
private String[] sodas = {"coke", "pepsi", "sprite", "dr. pepper"};
private int cokeInventory;
private int pepsiInventory;
private int spriteInventory;
private int drPepperInventory;
interface Parent1 {
public String identify();
public default String identify2() {
return "This method is called from Parent1";
}
}
interface Parent2 {
public String identify();
public default String identify3() {
import java.util.Arrays;
//add class definitions below this line
class Median {
public double calculateMedian(int num1, int num2, int num3, int num4, int num5){
int[] arr = { num1, num2, num3, num4, num5 };
double median = 0.0;
Arrays.sort(arr);
if (arr.length % 2 == 0){
median = ((double)arr[arr.length/2] + (double)arr[arr.length/2 - 1])/2;
clc;
close all;
clear;
disp('Project in Image Processing');
%////////////
%/// MAIN ///
%////////////
disp('Project in Image Processing');
pkg load image;
function remove_noise (f)
clc;
close all;
clear;
workspace;
format long g;
format compact;
=================================================================================
SA2
=================================================================================
We can think of a pixel value as a function that maps itself to values 0 to 255 in a grayscale image.
True
Which imadjust command should be applied to invert image img.
imadjust(img, [], [1,0])