Separate Kernel in 1D kernels 1.0 
Date Added: June 22, 2013  Visits: 179 


This function SEPARATEKERNEL will separate ( do decomposition of ) any 2D, 3D or nD kernel into 1D kernels. Of course only a subset of Kernels are separable such as a Gaussian Kernel, but it will give approximations for nonseparable kernels. Separating a 3D or 5D image filter into 1D filters will give an large speedup in image filtering with for instance the function imfilter. [K1 KN ERR]=SeparateKernel(H); inputs, H : The 2D, 3D ..., ND kernel outputs, K1 : Cell array with the 1D kernels KN : Approximation of the ND input kernel by the 1D kernels ERR : The sum of absolute difference between approximation and input kernel ..  How the algorithm works  If we have a separable kernel like H = [1 2 1 2 4 2 3 6 3]; We like to solve unknown 1D kernels, a=[a(1) a(2) a(3)] b=[b(1) b(2) b(3)] We know that, H = a'*b b(1) b(2) b(3)  a(1)h(1,1) h(1,2) h(1,3) a(2)h(2,1) h(2,2) h(2,3) a(3)h(3,1) h(3,2) h(3,3) Thus, h(1,1) == a(1)*b(1) h(2,1) == a(2)*b(1) h(3,1) == a(3)*b(1) h(4,1) == a(1)*b(2) ... We want to solve this by using fast matrix (least squares) math, c = M * d; c a column vector with all kernel values H d a column vector with the unknown 1D kernels But matrices "add" values and we have something like h(1,1) == a(1)*b(1); We solve this by taking the log at both sides(We replace zeros by a small value. Whole lines/planes of zeros are removed at forehand and readded afterwards) log( h(1,1) ) == log(a(1)) + log b(1)) The matrix is something like this, a1 a2 a3 b1 b2 b3 M = [1 0 0 1 0 0; h11 0 1 0 1 0 0; h21 0 0 1 1 0 0; h31 1 0 0 0 1 0; h21 0 1 0 0 1 0; h22 0 0 1 0 1 0; h23 1 0 0 0 0 1; h31 0 1 0 0 0 1; h32 0 0 1 0 0 1]; h33 Least squares solution d = exp(Mlog(c)) with the 1D kernels [a(1);a(2);a(3);b(1);b(2);b(3)] = d.. The Problem of Negative Values  The log of a negative value is possible it gives a complex value, log(1) = i*pi if we take the expontential it is back to the old value, exp(i*pi) = 1 But if we use the solver with on of the 1D vectors we get something like, this : input  result  abs(result)  angle(result) 1  0.0026 + 0.0125i  0.0128  1.7744 2  0.0117 + 0.0228i  0.0256  1.0958 3  0.0078 + 0.0376i  0.0384  1.7744 4  0.0234 + 0.0455i  0.0512  1.0958 5  0.0293 + 0.0569i  0.0640  1.0958 The absolute value is indeed correct (difference in scale is compensated by the other 1D vectors) As you can see the angle is correlated with the sign of the values. But I didn't found the correlation yet. For some matrices it is something like sign=mod(angle(solution)*scale,pi) == pi/2; In the current algorithm, we just flip the 1D kernel values one by one. The sign change which gives the smallest error is permanently swapped. Until swapping signs no longer decreases the error

License: Shareware  Size: 10 KB 
Puzzles

sudoku solver by darsie 1.6
sudoku solver by darsie project is a consolebased sudoku solver. sudoku solver by darsie is a console program that reads data from stdin (typically redirected from a file) and prints a possibly partial result. Definitive numbers are printed all... 
35.84 KB  
Libraries

Games::Mastermind::Solver 0.02
Games::Mastermind::Solver is a Master Mind puzzle solver. SYNOPSIS # a trivial Mastermind solver use Games::Mastermind; use Games::Mastermind::Solver::BruteForce; my $player = Games::Mastermind::Solver::BruteForce >new(... 
4.1 KB  
Development Tools

Angle between two vectors in 3 dimension 1.0
x=[i j k]y=[i j k]now run the function anglevec(x,y)you will get the result as the angle between the two vectors. 
10 KB  
Games

Yet Another SUDOKU GUI/Solver 1.1
Inspired by a discussion with my father on how to solve sudokus, I decided to implement a GUI for MATLAB and play around with automatic solving. The result can be found here: You can use the GUI just for playing sudoku and having an online check... 
10 KB  
Games

Suri's Sudoku Solver (SSS) 1.0
This function is a sudoku puzzle solver that uses a recursive algorithm described below. Step 1. Take a standard sudoku puzzle in matrix form with all the blank spots filled with zeros. For example, you could type puzzle=[7 0 0 5 8 3 0 0 6; 0 0 6... 
10 KB  
Games

Word Solver 1.5
Word Solver was designed with the US game show Lingo in mind. Basically you have five or six letter words that you have to guess. You'll get the first letter given to you, but you have to take turns guessing letters. Word Solver works by picking... 
28 KB  
Puzzles

A Sudoku Solver in C 1.11
A Sudoku Solver in C is a consolebased Linux program, written in C language, that solves Su Doku puzzles using deductive logic. It will only resort to trialanderror and backtracking approaches upon exhausting its deductive moves. Puzzles must... 
25.6 KB  
Puzzles

Rush Hour Puzzle Solver 0.2.7
Rush Hour Puzzle Solver project is a Rush Hour puzzle solver that illustrates the solution with PostScript. Rush Hour Puzzle Solver is a small C++ program that reads a Rush Hour board from a text file and produces a nice PostScript file that... 
460.8 KB  
Libraries

Koalog Constraint Solver 3.0
Koalog Constraint Solver is a powerful constraint solver written in Java. Koalog Constraint Solver project provides cuttingedge technology for solving satisfaction and optimization problems, including scheduling:  scheduling: Koalog... 
1024 KB  
Libraries

Games::Mastermind::Solver::BruteForce 0.02
Games::Mastermind::Solver::BruteForce is a Master Mind puzzle solver. SYNOPSIS # See Games::Mastermind::Solver Games::Mastermind::Solver::BruteForce uses the classical bruteforce algorithm for solving Master Mind puzzles. METHODS... 
4.1 KB 
Scripts

Freelancer Script 5.05
Main Features: 100% Secured. Email Support (3 Years). FREE Updates (3 Years). Post projects. Featured projects. Private projects. Sealed projects. Edit/delete projects. Select freelancers.... 
5.49 MB  
Scripts

B2B Script 4.20
Main Features: 100% Secured. Email Support (3 Years). FREE Updates (3 Years). Signup Account (Registration of account). Lead generation tools (for the sellers). Email verification to... 
5.49 MB  
Scripts

B2C Script 5.06
Main Features: 100% Secured. Email Support (3 Years). FREE Updates (3 Years). The script comes with totally editable site colors, icons and graphics Multilevel categories allows extensive browsing Admin can change Category ordering or... 
5.49 MB  
Scripts

Social Networking Script 2.86
Main Features: 100% Secured. Email Support (3 Years). FREE Updates (3 Years). Registration with name, email, password, date of birth etc. User can add multiple school, college, university with start... 
5.49 MB  
Scripts

Business Networking Script 8.04
Main Features: 100% Secured. Email Support (3 Years). FREE Updates (3 Years). Ajax based interface. Profile creation. Different types of profile. Profile for jobseekers, employers and employed... 
5.49 MB  
Multimedia

RMCA Realtime MIDI Chord Arranger Pro 4.2.8.0
RMCA Pro is an autoaccompaniment software which offers all major features of a high quality MIDI keyboard. It comes with chord recognition, based auto arranger, style creator, LeadSheet editor, recording section, up to 16 fingered and 10... 
1.53 MB  
Multimedia

Spectrum Analyzer pro 2015
This sophisticated piece of software turns your computer into a modern, StateofTheArt spectrum analyzer giving you features that go far beyond the possibilities of any standalone hardware unit VST Plugin supportLeq (m) movie calculator Leq... 
22.61 MB  
Multimedia

Multi Level Meter Bridge 2015
PAS Multi Meter Bridge can be configured in a number of different ways, to accurately model the ballistics, responses and graphics of a wide range of standard peak programme meters. These meters currently include the following:IEC 26810 Type I... 
5.22 MB  
Multimedia

DTMF Tone Decoder 2015
Why use an audio spectrum analyzer? For those of you that have done video installations, would you install a camera and lens without a monitor to see what you are doing? Why would you do an audio installation without seeing what you are doing? The... 
4.09 MB  
Multimedia

Frequency Generator 2014
NEW in this version Oscilloscope srcoller and accelerator Efects like Peak and Splitt Oscilloscope kinds like Con. Lines, Dots, Mir Lines, Spikes, Vert. Lines Analyse the real time input in the Oscilloscope Now you can record the generated Tones... 
2.01 MB 