counting

Count Color objects in images

青春壹個敷衍的年華 提交于 2019-12-13 02:08:32
问题 I'm working in image segmentation, testing a lot of different segmentation algorithms, in order to do a comparitive study. At the moment i've implemented the mean shift algorithm. I would like to count the objects segmented in the image. In this images there are two types of objects, with different colors. I have a the manually counting done by specialists so i would like to compare the results. The result image is: There is any way for me to automize this process? Can you please help me out!

Counting distinct items in XSLT

我是研究僧i 提交于 2019-12-12 20:13:50
问题 I have XML like this: <assessment> <variables> <variable> <attributes> <variable_name value="FRED"/> </attributes> </variable> </variables> <variables> <variable> <attributes> <variable_name value="MORTIMER"/> </attributes> </variable> </variables> <variables> <variable> <attributes> <variable_name value="FRED"/> </attributes> </variable> </variables> </assessment> I know that with this XSLT: <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0"> <xsl:output method=

Count elements in a multidimensional array

我是研究僧i 提交于 2019-12-12 11:49:17
问题 Ive got this code: loadData : function(jsonArray) { var id = $(this).attr("id"); for(var i in jsonArray) { $("#"+id+" tbody").append('<tr class="entry-details page-1 entry-visible" id="entry-'+i+'"></tr>'); var header = { 1: "time", 2: "project", 3: "task" } var col = 1; while(col <= jsonArray[i].length) { $("#"+id+" tbody #entry-"+i).append("<td>"+jsonArray[i][header[col]]+"</td>") col++ }} It will take a JSON array that looks similar to the following {"1":{"project":"RobinsonMurphy","task":

Grouping and counting to get a closerate

强颜欢笑 提交于 2019-12-12 08:25:29
问题 I want to count per country the number of times the status is open and the number of times the status is closed . Then calculate the closerate per country . Data: customer <- c(1,2,3,4,5,6,7,8,9) country <- c('BE', 'NL', 'NL','NL','BE','NL','BE','BE','NL') closeday <- c('2017-08-23', '2017-08-05', '2017-08-22', '2017-08-26', '2017-08-25', '2017-08-13', '2017-08-30', '2017-08-05', '2017-08-23') closeday <- as.Date(closeday) df <- data.frame(customer,country,closeday) Adding status : df$status

Counting words in PHP

ⅰ亾dé卋堺 提交于 2019-12-12 05:25:34
问题 I have a problem with counting words in PHP, this is my code: $word=substr(stripslashes(strip_tags($row['short_story'], '<a></a>')), 0,100 )."..."; $tpl->set( '{word}',$word); on that code i just can show URL links in my result, i need to show complete style and HTML codes, so i changed to this: $word = substr( stripslashes (strip_tags($row['short_story'], '<a><b><i><u><br></a><div></div>')), 0,400 )."..."; i changed this: <a></a> to: <a><b><i><u><br></a><div></div> But problem is, i have to

Counting database entries that are the same/mysqli_num_rows

不问归期 提交于 2019-12-12 04:15:52
问题 There doesn't seem to be a similar question anywhere. I need this to just loop through each unique value, and then kick out how many are the same but, somehow I'm using mysqli_num_rows wrong. Thank you in advance. //This portion fetches unique entries that aren't empty $query = "SELECT DISTINCT burger "; $query .= "FROM newbob "; $query .= "WHERE burger != '' "; $query .= "ORDER BY burger ASC "; $result = mysqli_query($dbc, $query); if (!$result){ die ("Database query failed."); } //and I

Time counting over midnight

青春壹個敷衍的年華 提交于 2019-12-11 19:30:20
问题 Counting time over midnight fails Counting time over midnight fails I have made a code with two counters - one (CountUPS) that counts seconds from 0 every time I start the program (A1) and one(CountUP) that counts seconds from a preset time (A2). It works fine while it counts within the same day, but it gets a bug every time it shall count over midnight. It stops when A2 reach 23:37:53 in time. Is something wrong in my definition of values? Sub RunMe() Dim StartS As Single Dim CellS As Range

Hackerearth bubbleSort

只愿长相守 提交于 2019-12-11 14:08:41
问题 In Hackerearth i tried solving bubble sort swap counting. and my output always different from correct output.for example; my output is 2475 and correct output is 2788 #include <iostream> using namespace std; int main() { int *A,tm,times=0; cin >> tm; A = new int[tm]; for(int i = 0; i<tm;i++) {cin >> A[i];} int temp; for(int i = 0; i<tm;i++){ for(int j = 0; j < tm-i-1;j++){ if(A[j] > A[j+1]){ times++;; temp = A[j]; A[j] = A[j+1]; A[j] = temp; } } } cout << times; return 0; } Am i doing

Sum number of div in the html table xslt

倾然丶 夕夏残阳落幕 提交于 2019-12-11 11:49:47
问题 I need help with counting of div in table I need sum div in whole table and the result of sum put below table. Here is my output of table: <html> <body> <h2>Designated Points</h2> <table border="1"> <tr bgcolor="#9acd32"> <th>Coordinates</th> <th>NAME</th> </tr> <tr> <td><div>51.111217 4.5630126</div></td> <td>EKELEE</td> </tr> <tr> <td> <div>50.8527128 3.1472122</div></td> <td>EB1212S14</td> </tr> <tr> <td> <div>50.4812972 3.811225</div><br> <div>50.4351228 3.9531289</div><br> <div>50

COUNTA by month and by exclusion in Google Sheets

泪湿孤枕 提交于 2019-12-11 10:58:22
问题 HERE IS A SAMPLE SHEET WITH SOLUTION WORKING: https://docs.google.com/spreadsheets/d/1Twc9i7D5rDvT_Q88thrwjV8E58Ja7c-ifdlCZDwu6Ok/edit?usp=sharing I have a Google Sheet where I have registries that come from a Google Forms for some sort of Help Desk registry. I'm trying to make a general report tab where things are count, in total and for the current month. For example, I'm counting how many entries are classified as 'open' and 'ended' For the global total of 'open' registries I have: =COUNTA