this is an active contour method in python 2.7 I need to adjust just this program import Tkinter fro

this is an active contour method in python 2.7 I need to adjust just this program 

import Tkinter

from Tkinter import *

import os

import sys

import ImageTk, Image

import PIL

from PIL import *

from array import array

from turtle import *

import math

from math import pi

 

#creating a window

window=Tkinter.Tk()

window.geometry(“650×650”)

window.title(“Active Contour Implementation”)

window.configure()

 

 

#function for  open file 

 

    

#function for new form   

def OpenNew():

    openNew=Tkinter.Tk()

    openNew.title(“Welcome”)

    openNew.geometry(“500×500”)

    

    menubar = Menu(openNew)

    filemenu = Menu(menubar, tearoff=0)

    filemenu.add_command(label=”New”, command=OpenNew)

    filemenu.add_command(label=”Open”, command=openFile)

    filemenu.add_command(label=”Save”)

    filemenu.add_command(label=”Save as…”, command=saveAs)

 

    filemenu.add_separator()

 

    filemenu.add_command(label=”Exit”, command=OpenNew.quit)

 

    openNew.config(menu=menubar)

    openNew.mainloop()

    

#Enter the value

entr=Entry(window)

entr.pack(fill=Y)

entr.delete(0, END)

entr.insert(0, ”  input the value”)

 

 

#Active Contour Implementation

 

imgOpen=”image3.jpg”

 

image1 = ImageTk.PhotoImage(Image.open(imgOpen))

w = image1.width()

h = image1.height()

x = 0

y = 0

window.geometry(“%dx%d+%d+%d” % (w, h, x, y))  

Lbl = Tkinter.Label(window, image=image1)

Lbl.pack(side='top', fill='both', expand='yes')

Lbl.image = image1

 

print w

print h

 

newX=w/2

newY=h/2

 

 

print 'newwwwww'

 

print newX

print newY

 

n=150

s_radius=250

 

LCV=array(“i”)

for i in range (n):

    LCV.append(i)

        

L1X = array(“i”)

for i in range (n):

    L1X.append(i)

 

L1Y = array(“i”)

for i in range (n):

 L1Y.append(i)

 

L2X = array(“i”)

for i in range (n):

 L2X.append(i)  

 

L2Y = array(“i”)

for i in range (n):

 L2Y.append(i)   

 

BordersX = array(“i”)

for i in range (n):

 BordersX.append(i)   

     

BordersY = array(“i”)

for i in range (n):

  BordersY.append(i)  

    

xFill=[BordersX, -1]

yFill=[BordersY, -1]

 

 

#Set=color('red')

step_size=15

jump_threshold=25

#setWidth?

 

 

radius=s_radius

radius>10

radius=radius-step_size

 

if radius==s_radius:

   i=0

   while i

       x_0=radius *  cos ( i * (2*pi)/n)

       y_0=radius *  sin ( i * (2*pi)/n)

       x_0 = x_0 + newX

       y_0 = y_0 + newY

       BordersX[i]= x_0

       BordersY[i]= y_0

       LCV[i] = -1

       i+=1

   

pnt_cnt=0

j=0

while j

    if LCV[j]== -1:

        x_0=radius *  cos( i * (2*pi)/n)   + newX

        y_0=radius *  sin ( i * (2*pi)/n)  + newY

        

        x_1=((radius  – step_size) *  cos( i * (2*pi)/n)   ) + newX

        y_1=((radius  – step_size) *  sin ( i * (2*pi)/n)  ) + newY

        v_0 = getPixel(x_0, y_0)

       

        v_1 = getPixel(x_1, y_1)

        if gVal(v_0) – gVal(v_1)  > jump_threshold:

            

            LCV[i]=1

        else:

            BordersX[i]= x_1 

            BordersY[i]= y_1

            Pol=Tkinter.Canvas(window)

            Pol.pack()

            Pol.create_line(BordersX, BordersY)

            wait(20)

    pnt_cnt=pnt_cnt + 1

    i+=1

    

def gVal(v):

     red = (v>>16)&0xff

     green = (v>>8)&0xff

     blue = v&0xff

     return (00.56 * red + 0.33*green + 0.11 * blue)

 

# Menu Option

#File menu

menubar=Menu(window)

filemenu=Menu(menubar, tearoff=0)

filemenu.add_command(label=”New”,command=OpenNew)

filemenu.add_command(label=”Open”, command=openFile)

filemenu.add_command(label=”Save”)

filemenu.add_command(label=”Save As”,command=saveAs)

filemenu.add_separator()

filemenu.add_command(label=”Exit”,command= window.quit)

menubar.add_cascade(label=”File”, menu=filemenu)

 

#Edit menu

editmenu=Menu(menubar, tearoff=0)

editmenu.add_command(label=”Cut”)

editmenu.add_command(label=”Copy”)

editmenu.add_command(label=”Paste”)

editmenu.add_command(label=”Delete”)

editmenu.add_command(label=”Select All”)

menubar.add_cascade(label=”Edit”,menu=editmenu)

 

#Help menu

helpmenu=Menu(menubar, tearoff=0)

helpmenu.add_command(label=”About”, command=help)

helpmenu.add_command(label=”Help”, command=help)

menubar.add_cascade(label=”Help”, menu=helpmenu)

 

window.config(menu=menubar)

 

window.mainloop()

 

    • Posted: 4 years ago
    • Due: 07/12/2015
    • Budget: $8

     

    “Looking for a Similar Assignment? Get Expert Help at an Amazing Discount!”

    The post this is an active contour method in python 2.7 I need to adjust just this program import Tkinter fro appeared first on Nursing Assignment.

    discussion about globalization – The Nursing Hub

    How do you think company managers from a country that has a relatively homogeneous culture might react when they do business with the culturally diverse staff of a company in a less homogeneous country? Please feel free to use examples.
    Discussion should be around 250 words.
     
    Do you need a similar assignment done for you from scratch? We have qualified writers to help you. We assure you an A+ quality paper that is free from plagiarism. Order now for an Amazing Discount!Use Discount Code “Newclient” for a 15% Discount!NB: We do not resell papers. Upon ordering, we do an original paper exclusively for you.

    Practicum Journal Entry I

     Practicum Journal Entry I 

    You will submit a journal entry for Weeks 1-3. Journal entries need to connect your previous professional experience with your practice, competencies/concepts in the program, and the literature. Your journal entry should be week-based and sequential so that all journal entries are contained in one file.

    By tomorrow 12/16/18 by 12 pm, write a minimum of 550 words essay in APA format with at least 2 scholarly references. Include the headers as numbered below:

    1) Describe the observed activity (1point) (see attached file)

    2) Using an evidence-based approach, analyze the problem, issue, or situation. Address questions posed in the weekly practicum pages if appropriate. (2 points)

    3) Reveal how the real-world might mirror or diverge from program-related evidence, concepts, and/or theories. (2 points)

    P.S. please see attached file summarizing the activities I observed at my practicum site. Please re-write it in your own words to address all the above numbered questions as well as references.

    This assignment is due on Sunday 12/16/2018 at 12 pm on AMERICA/New York time zone

     

    Do you need a similar assignment done for you from scratch? We have qualified writers to help you. We assure you an A+ quality paper that is free from plagiarism. Order now for an Amazing Discount!
    Use Discount Code “Newclient” for a 15% Discount!

    NB: We do not resell papers. Upon ordering, we do an original paper exclusively for you.

    The post Practicum Journal Entry I appeared first on Essay Writers.

    Give detailed answers to the following questions: Describe the market research—type and purpose—that

    Give detailed answers to the following questions: Describe the market research—type and purpose—that youconducted, or will conduct, prior to your business start-up. Why issuch research necessary and why is it necessary to continue,through the business operation, to conduct appropriateresearch? Explain how and why business plans need to be regularlyreviewed. How do you, or how do you think you will, conduct reviewsin your organisation? Describe the processes and stepsinvolved. How can such reviews be utilised to take advantage of newbusiness opportunities? Through what procedures is it possible to identify newmarkets? In what ways might plans and goals need to be adjusted as aresult of market research? (1,000–2,000 words) Attached

     

    “Looking for a Similar Assignment? Get Expert Help at an Amazing Discount!”

    The post Give detailed answers to the following questions: Describe the market research—type and purpose—that appeared first on Nursing Assignment.