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
=================================================================================
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])
disp('Project in Image Processing');
pkg load image;
function remove_noise (f)
clc;
close all;
clear;
workspace;
format long g;
format compact;
clc;
close all;
clear;
disp('Project in Image Processing');
%////////////
%/// MAIN ///
%////////////
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;
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() {
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;
//add class definitions below this line
class Atm {
private double money;
public double getMoney(){
return money;
}
public void deposit(double s){
Double v = Double.valueOf(s);
if(v>=0){
money += v;
//add class definitions below this line
import java.util.*;
class Watch {
private String manufacturer;
private String model;
private int diameter;
private int waterResistance;
private String material;
public Watch(String m, String mo, int d, int w, String ma){
manufacturer = m.toLowerCase();
//add class definitions below this line
import java.text.DecimalFormat;
import java.math.RoundingMode;
class Song{
private String artist;
private String title;
private String album;
private int playCount;
private static final Double PAY_RATE = 0.001;
private Double moneyEarned;
class TestClass {
private String color;
public TestClass(String c) {
color = c;
}
public String returnColor() {
return color;
}
public void changeColor(String newColor) {
color = newColor;