Skip to content

Instantly share code, notes, and snippets.

View CreativeSoftware99's full-sized avatar

CreativeSoftware99

View GitHub Profile
.item{:id => "item#{item.id}"}= item.body
<div class='item' id='item<%= item.id %>'>
<%= item.body %>
</div>
%strong{class: "code", id: "message"} Hello, World!
<strong class="code" id="message">Hello, World!</strong>
%strong= item.title
<strong><%= item.title %></strong>
= form_for @product, url: {action: "create"}, html: {multipart: true} do |f|
%table
%tr
%td
%label{:for => "product_name"}> Name
%td
= f.text_field :name
%tr
%td
%label{:for => "product_price"}> Price
<%= form_for @product, url: {action: "create"}, html: {multipart: true} do |f| %>
<table>
<tr>
<td>
<label for = "product_name">Name</label>:
</td>
<td>
<%= f.text_field :name %>
</td>
</tr>
//Set the SVM parameters
CvSVMParams params;
params.svm_type = CvSVM::C_SVC;
params.kernel_type = CvSVM::LINEAR;
params.term_crit = cvTermCriteria(CV_TERMCRIT_ITER, 100, 1e-6);
// Train the SVM
CvSVM SVM;
SVM.train(trainingSet, labelsMat, Mat(), Mat(), params);
Mat grayMat;
cvtColor(colorMat, grayMat, CV_RGB2GRAY);