Open-source tool to convert/port/migrate/optimize Octave/MATLAB(R) written projects to C-code. Consists of C-code generator and run-time support library. Support a subset of MATLAB (R) language and an extendable set of in-build functions.
Git Repository: https://github.com/csafonov/tinymc
License
BSD License, GNU General Public License version 3.0 (GPLv3)Follow TMC compiler
Other Useful Business Software
Get Avast Free Antivirus | Your top-rated shield against malware and online scams
Our antivirus software scans for security and performance issues and helps you to fix them instantly. It also protects you in real time by analyzing unknown files before they reach your desktop PC or laptop — all for free.
Rate This Project
Login To Rate This Project
User Reviews
-
tried the example App1 and altered the code, but it is not working. Syntax error happens Tried to convert this: function im_out = our_RF(im_in, sigma_s, sigma_r) [R C CH] = size(im_in); % Compute the domain transform (Equation 11 of our paper). % Estimate horizontal and vertical partial derivatives using finite % differences. dIdx = zeros(R,C); dIdy = zeros(R,C); % Compute the l1-norm distance of neighbor pixels. % use sobel filters matrices dx = [-1, 0, 1; -2, 0, 2; -1, 0, 1] / 8.0; dy = [-1, -2, -1; 0, 0, 0; 1, 2, 1] / 8.0; for ch = 1:CH % original work derivatives % dIdx(:,2:end) = dIdx(:,2:end) + abs( dIcdx(:,:,ch) ); % dIdy(2:end,:) = dIdy(2:end,:) + abs( dIcdy(:,:,ch) ); dIcdx(:,:,ch) = conv2(im_in(:,:,ch) , dx, 'same'); dIcdy(:,:,ch) = conv2(im_in(:,:,ch) , dy, 'same'); dIdx = dIdx + abs( dIcdx(:,:,ch) ); dIdy = dIdy + abs( dIcdy(:,:,ch) ); end dIdx = dIdx / CH; dIdy = dIdy / CH; % Compute the derivatives of the horizontal and vertical domain transforms. dHdx = (1 + sigma_s/sigma_r * dIdx); dVdy = (1 + sigma_s/sigma_r * dIdy); % The vertical pass is performed using a transposed image. dVdy = dVdy'; % Perform the filtering. im_out = image_transpose(im_in); im_out = TransformedDomainRecursiveFilter_Horizontal(im_out, dVdy, sigma_s); im_out = image_transpose(im_out); im_out = TransformedDomainRecursiveFilter_Horizontal(im_out, dHdx, sigma_s); end % Recursive filter. function F = TransformedDomainRecursiveFilter_Horizontal(im_in, D, sigma_s) % Feedback coefficient (Appendix of our paper). a = exp(-sqrt(2) / sigma_s); F = im_in; V = a .^ D; [R C CH] = size(im_in); % Left -> Right filter. for i = 2:C for ch = 1:CH F(:,i,ch) = F(:,i,ch) + V(:,i) .* ( F(:,i - 1,ch) - F(:,i,ch) ); end end % Right -> Left filter. for i = C-1:-1:1 for ch = 1:CH F(:,i,ch) = F(:,i,ch) + V(:,i+1) .* ( F(:,i + 1,ch) - F(:,i,ch) ); end end end % Recursive filter. % function im_out = image_transpose(im_in) [R C CH] = size(im_in); im_out = zeros([C, R, CH], class(im_in)); for ch = 1:CH im_out(:,:,ch) = im_in(:,:,ch)'; end end