Hello, well i have a problem and i don't even know in which list ask,
so if anyone know a little about image processing and morphometrics
and could enlighten me.
My problem is as follow, i was trying to learn a little about
morphometrics and was reading Morphometrics with R book.
I was able to process a image of spermatozoids and retrieve their
contours with EBimage package and was playing with the functions on
the book.
But each contour of the head of the spermatoidz image I'm looking is
oriented to one side.
Reading an article of Ostermeier et al he cite that "A method to
consistently orient sperm was developed that was both objective and
able to be automated."
So i was wondering how is this done? Is there any magic word to start
search for a solution on google so something like that?
EBimage and other packages actually have a function to rotate image,
so i was wondering if there is already a clever solution, like make
the largest diameter be perpendicular to x axis, thing like this, or
it need far more complex solutions?
Here is an example of 4 contours, also i post a link to the original
image, i can post the rest of the script, but basically i use EBimage
and ocontour function to get here.
#
par(mfrow=c(2,2))
for(i in 1:4) {plot(sptz[[i]])}
Thanks for the patience and any hint on where to look for a solution
for problems like this is welcome.
Reference
Ostermeier GC, Sargeant GA, Yandell BS, Evenson DP, Parrish JJ. The
relationship of bull fertility to sperm nuclear shape. J of Androl.
2001;22(4):595-603
Original Image link:
http://s9.postimage.org/sea4l288f/exe.jpg
#Data of the Example
> dput(sptz)
list(structure(c(718L, 717L, 716L, 715L, 714L, 713L, 712L, 711L,
710L, 709L, 708L, 707L, 706L, 705L, 704L, 703L, 702L, 701L, 700L,
699L, 698L, 697L, 696L, 695L, 694L, 693L, 692L, 691L, 690L, 689L,
688L, 687L, 686L, 685L, 684L, 683L, 682L, 681L, 680L, 679L, 678L,
677L, 676L, 675L, 674L, 673L, 672L, 671L, 670L, 669L, 669L, 669L,
669L, 669L, 669L, 669L, 669L, 669L, 669L, 669L, 669L, 670L, 670L,
671L, 672L, 672L, 673L, 674L, 674L, 675L, 676L, 677L, 678L, 679L,
680L, 681L, 682L, 683L, 684L, 685L, 686L, 687L, 688L, 689L, 690L,
691L, 692L, 693L, 694L, 695L, 696L, 697L, 698L, 699L, 700L, 701L,
702L, 703L, 704L, 705L, 706L, 707L, 708L, 709L, 710L, 711L, 712L,
713L, 714L, 715L, 716L, 717L, 718L, 719L, 720L, 721L, 722L, 723L,
724L, 725L, 726L, 727L, 728L, 728L, 728L, 728L, 727L, 727L, 726L,
726L, 725L, 725L, 725L, 725L, 724L, 724L, 724L, 723L, 722L, 721L,
720L, 719L, 78L, 79L, 79L, 79L, 79L, 79L, 79L, 79L, 79L, 79L,
80L, 80L, 80L, 80L, 80L, 80L, 81L, 80L, 81L, 81L, 81L, 81L, 81L,
82L, 82L, 82L, 82L, 82L, 82L, 82L, 83L, 83L, 83L, 84L, 84L, 84L,
85L, 85L, 85L, 86L, 86L, 87L, 87L, 88L, 89L, 89L, 90L, 91L, 92L,
93L, 94L, 95L, 96L, 97L, 98L, 99L, 100L, 101L, 102L, 103L, 104L,
105L, 106L, 107L, 108L, 109L, 110L, 111L, 112L, 113L, 113L, 114L,
114L, 114L, 114L, 114L, 115L, 115L, 115L, 114L, 114L, 114L, 114L,
115L, 114L, 114L, 114L, 113L, 113L, 113L, 113L, 112L, 112L, 112L,
111L, 111L, 110L, 109L, 108L, 107L, 107L, 106L, 105L, 105L, 104L,
104L, 103L, 102L, 101L, 101L, 100L, 100L, 99L, 98L, 98L, 97L,
96L, 96L, 95L, 94L, 94L, 93L, 93L, 92L, 91L, 90L, 89L, 88L, 87L,
86L, 85L, 84L, 83L, 82L, 81L, 80L, 79L, 79L, 78L, 78L, 78L, 78L
), .Dim = c(142L, 2L)), structure(c(415L, 414L, 413L, 412L, 411L,
410L, 409L, 408L, 407L, 406L, 405L, 404L, 403L, 402L, 401L, 400L,
399L, 398L, 397L, 397L, 396L, 397L, 396L, 395L, 395L, 394L, 394L,
393L, 394L, 394L, 394L, 394L, 394L, 394L, 394L, 395L, 395L, 396L,
396L, 397L, 398L, 399L, 400L, 401L, 402L, 403L, 403L, 404L, 405L,
406L, 407L, 408L, 409L, 410L, 411L, 412L, 413L, 414L, 415L, 416L,
417L, 418L, 419L, 420L, 421L, 422L, 423L, 424L, 425L, 426L, 427L,
428L, 429L, 430L, 431L, 432L, 433L, 434L, 435L, 436L, 437L, 438L,
439L, 440L, 439L, 438L, 439L, 440L, 441L, 442L, 443L, 444L, 445L,
446L, 447L, 448L, 449L, 450L, 451L, 452L, 453L, 454L, 455L, 456L,
455L, 455L, 454L, 454L, 454L, 454L, 454L, 454L, 454L, 455L, 454L,
454L, 453L, 452L, 451L, 450L, 449L, 448L, 447L, 446L, 445L, 444L,
443L, 442L, 441L, 440L, 439L, 438L, 437L, 436L, 435L, 434L, 433L,
432L, 431L, 430L, 429L, 428L, 427L, 426L, 425L, 424L, 423L, 422L,
421L, 420L, 419L, 418L, 417L, 416L, 221L, 222L, 222L, 222L, 222L,
223L, 223L, 223L, 223L, 223L, 224L, 224L, 224L, 224L, 225L, 225L,
226L, 226L, 227L, 228L, 229L, 230L, 231L, 231L, 232L, 233L, 234L,
235L, 236L, 237L, 238L, 239L, 240L, 241L, 242L, 243L, 244L, 245L,
246L, 247L, 248L, 249L, 248L, 249L, 249L, 250L, 251L, 251L, 252L,
253L, 253L, 253L, 253L, 252L, 252L, 252L, 253L, 252L, 252L, 252L,
252L, 252L, 252L, 252L, 252L, 252L, 252L, 252L, 252L, 251L, 251L,
251L, 250L, 250L, 249L, 250L, 249L, 248L, 247L, 247L, 247L, 246L,
245L, 245L, 245L, 244L, 243L, 242L, 243L, 244L, 243L, 242L, 242L,
241L, 241L, 241L, 240L, 240L, 240L, 240L, 240L, 239L, 238L, 237L,
236L, 235L, 234L, 233L, 232L, 231L, 230L, 229L, 228L, 227L, 226L,
225L, 224L, 224L, 224L, 224L, 223L, 223L, 223L, 223L, 223L, 223L,
223L, 223L, 223L, 223L, 223L, 222L, 222L, 222L, 222L, 222L, 222L,
222L, 222L, 222L, 222L, 221L, 221L, 221L, 222L, 221L, 221L, 221L,
221L, 221L, 221L, 221L, 221L, 221L), .Dim = c(154L, 2L)), structure(c(395L,
394L, 393L, 393L, 393L, 393L, 393L, 392L, 391L, 390L, 390L, 390L,
390L, 391L, 392L, 393L, 394L, 395L, 396L, 397L, 398L, 399L, 400L,
401L, 402L, 402L, 403L, 403L, 403L, 403L, 404L, 405L, 406L, 407L,
408L, 409L, 410L, 411L, 412L, 413L, 414L, 414L, 415L, 416L, 416L,
417L, 418L, 419L, 420L, 421L, 422L, 423L, 424L, 425L, 426L, 427L,
428L, 429L, 430L, 431L, 432L, 433L, 434L, 435L, 436L, 437L, 437L,
438L, 439L, 440L, 441L, 441L, 442L, 443L, 444L, 445L, 446L, 446L,
447L, 448L, 449L, 449L, 449L, 450L, 449L, 450L, 450L, 449L, 449L,
449L, 449L, 448L, 447L, 446L, 445L, 444L, 443L, 442L, 441L, 440L,
439L, 438L, 437L, 436L, 435L, 434L, 433L, 432L, 431L, 430L, 429L,
428L, 427L, 426L, 425L, 424L, 423L, 422L, 421L, 420L, 419L, 418L,
417L, 416L, 415L, 414L, 413L, 412L, 411L, 410L, 409L, 408L, 407L,
406L, 405L, 404L, 403L, 402L, 401L, 400L, 399L, 398L, 397L, 396L,
540L, 541L, 542L, 543L, 544L, 545L, 546L, 547L, 548L, 549L, 550L,
551L, 552L, 553L, 554L, 555L, 556L, 556L, 557L, 558L, 559L, 560L,
561L, 562L, 563L, 564L, 565L, 566L, 567L, 568L, 568L, 569L, 569L,
568L, 568L, 568L, 569L, 568L, 569L, 568L, 569L, 570L, 570L, 571L,
572L, 573L, 573L, 573L, 574L, 574L, 574L, 575L, 575L, 575L, 575L,
576L, 577L, 576L, 577L, 576L, 576L, 576L, 577L, 577L, 577L, 578L,
577L, 576L, 576L, 576L, 575L, 574L, 573L, 574L, 574L, 573L, 572L,
571L, 570L, 569L, 568L, 567L, 566L, 565L, 564L, 563L, 562L, 561L,
560L, 559L, 558L, 557L, 556L, 556L, 555L, 554L, 554L, 554L, 553L,
552L, 552L, 551L, 551L, 550L, 549L, 549L, 549L, 548L, 548L, 547L,
547L, 546L, 546L, 546L, 546L, 545L, 545L, 544L, 544L, 543L, 543L,
543L, 543L, 543L, 542L, 542L, 542L, 542L, 542L, 541L, 541L, 541L,
541L, 541L, 540L, 540L, 540L, 540L, 540L, 540L, 540L, 540L, 540L,
540L), .Dim = c(144L, 2L)), structure(c(34L, 33L, 32L, 31L, 30L,
29L, 28L, 27L, 26L, 25L, 24L, 23L, 22L, 21L, 20L, 19L, 18L, 17L,
16L, 15L, 14L, 13L, 12L, 11L, 10L, 9L, 8L, 7L, 6L, 5L, 4L, 3L,
2L, 1L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L,
0L, 0L, 0L, 0L, 0L, 0L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L,
11L, 12L, 13L, 14L, 15L, 16L, 17L, 18L, 19L, 20L, 21L, 22L, 23L,
24L, 25L, 26L, 27L, 28L, 29L, 30L, 31L, 32L, 33L, 34L, 35L, 36L,
37L, 38L, 39L, 40L, 41L, 42L, 43L, 44L, 45L, 46L, 47L, 47L, 48L,
49L, 49L, 50L, 50L, 50L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L,
50L, 50L, 50L, 49L, 49L, 48L, 47L, 46L, 45L, 44L, 44L, 44L, 44L,
43L, 42L, 41L, 40L, 39L, 38L, 37L, 36L, 35L, 362L, 363L, 363L,
364L, 364L, 365L, 365L, 365L, 366L, 366L, 366L, 366L, 367L, 367L,
368L, 368L, 369L, 370L, 371L, 372L, 373L, 373L, 374L, 375L, 375L,
376L, 377L, 377L, 378L, 379L, 380L, 381L, 382L, 382L, 382L, 383L,
384L, 385L, 386L, 387L, 388L, 389L, 390L, 391L, 392L, 393L, 394L,
395L, 396L, 397L, 398L, 399L, 400L, 401L, 400L, 401L, 401L, 401L,
401L, 401L, 402L, 402L, 402L, 401L, 401L, 402L, 402L, 402L, 402L,
402L, 401L, 401L, 400L, 401L, 401L, 401L, 400L, 400L, 401L, 400L,
401L, 401L, 401L, 400L, 400L, 399L, 399L, 398L, 398L, 397L, 397L,
396L, 395L, 394L, 393L, 393L, 392L, 392L, 391L, 391L, 391L, 390L,
389L, 388L, 387L, 386L, 385L, 384L, 383L, 382L, 381L, 380L, 379L,
378L, 377L, 376L, 375L, 374L, 373L, 372L, 371L, 370L, 369L, 369L,
369L, 368L, 367L, 366L, 365L, 364L, 364L, 363L, 362L, 362L, 362L,
362L, 362L, 362L), .Dim = c(138L, 2L)))
--
Grato
Augusto C. A. Ribas
Site Pessoal: http://recologia.wordpress.com/
Lattes: http://lattes.cnpq.br/7355685961127056
_______________________________________________
R-sig-phylo mailing list - [email protected]
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/[email protected]/