Skip to content

Instantly share code, notes, and snippets.

@agaikwad123
agaikwad123 / Contrast stretching-Study of Gray level transformations on an image using MATLAB
Last active May 8, 2016 21:32
Study of Gray level transformations on an image using MATLAB
a= input (Enter the path of the image:); % accept image path from user
b= imread (a); % read the image
[x,y]=size (b); % store the image in matrix form
d=max (max (b)); % find he max value in the matrix
for i=1:x
for j=1:y
@agaikwad123
agaikwad123 / Socket Programming 1
Last active May 8, 2016 22:06
Socket Programming
//server11//
import java.io.*;
import java.net.*;
class server11
{
public static void main(String args[])
clear all;
clc;
n=5; % no. of inputs
disp(Probabilities of messages:);
p=[0.4 0.2 0.1 0.2 0.1];disp(p);
clc;
clear all;
close all;
k=input(enter the input elements:);
n=input(enter the input elements:);
clear all;
clc;
n=5; % no. of inputs
disp('Probabilities of messages :');
p=[0.4 0.2 0.1 0.2 0.1];disp(p);
ibrary IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
entity tfc101 is
Port ( rst : in std_logic;
clk : in std_logic;
R1 : out std_logic;
Y1 : out std_logic;
G1 : out std_logic;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
-- Uncomment the following lines to use the declarations that are
-- provided for instantiating Xilinx primitive components.
--library UNISIM;
--use UNISIM.VComponents.all;
entity Ram_4_8 is
#include<stdio.h>
#include<conio.h>
#include<stdlib.h>
#include<string.h>
struct MNT
{
char mname[20];
int mdtp;
#include<stdio.h>
#include<string.h>
struct MOTtable
{
char Mnemonic[6];
int Class;
char Opcode[3];
};
struct symboltable
Clc
I=imread('cameraman.tif');
[m n]=size(I);
a=im2double(I);
for i=1:m-2
for j=1:n-2
v(i,j) = [a(i,j) + a(i,j+1) + a(i,j+2) + a(i+1,j) + a(i+1,j+1) + a(i+1,j+2) + a(i+2,j) + a(i+2,j+1) + a(i+2,j+2)]./9; %smoothing filter
x(i,j) = [0*a(i,j) + 1*a(i,j+1) + 0*a(i,j+2) + 1*a(i+1,j) + -4*a(i+1,j+1) + 1*a(i+1,j+2) + 0*a(i+2,j) + 1*a(i+2,j+1) + 0*a(i+2,j+2)]; %high pass filter